Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/17/2017 in all areas

  1. Speed, stability, effort in coding, maintenance, understandability, time of development,...... are all kinds of factors you could consider. I would have been happy with the 30 seconds initial solution as long as its not on the critical path in your team/project. If you really want speed you would follow the registry approach. So basically it depends on your requirements. Its now to fast that I am not even sure if in between the UI Windows are there (should make a screenshot after each window appears) This was a nice excercise in all possibilities of UIA and will add these ones to the examples of uiawrappers.
    1 point
  2. Ratio ? Hmmm. Not sure that a game window whose size is let's say, 900x900, will get a different size if the resolution changes
    1 point
  3. This post has nothing to do with the interesting things I wrote about at the bottom of post #44. I'll still return to this in another post. Comments on the code in post #34. The code in this post implements a custom COM event handler to detect window open events. Because UI Automation code is based on COM interfaces and the objects are created with ObjCreateInterface, such a custom event handler must be created with ObjectFromTag function. A large part of the code is about implementing this event handler. Because the event handler detects window open events and nothing else (it doesn't detect if the window is already open) it's crucial that the event handler starts up and is ready to listen to window open events before the Shell_Flyout window opens. If the Shell_Flyout window opens before the event handler is ready, the event handler will wait for the open event in the loop. Because the Shell_Flyout window is already open it'll wait forever. Unless you open the Shell_Flyout window manually so that it can detect the window open event. The last sentence is an explanation to post #43. On my PC the event handler always starts up before the Shell_Flyout window opens. And the code works. On careca's PC it seems to be the opposite most of the time. The Shell_Flyout window opens before the event handler is ready. The event handler is unable to detect the window open event and hangs in the loop. The code doesn't work. Comments on the code in post #44. This is standard UI Automation code. Very often you need a Sleep to wait for a window to open. This is also the case here. The first time you run the code eg. after a reboot the code always run slower. The next time when files are stored in the disk cache (maybe also because of other reasons) the code runs faster. To make sure that the code works on my PC the first time after a reboot I need to set the Sleep time as high as 250 ms. But the next time I run the code I can see the Shell_Flyout window flashing because of the long Sleep. That's pretty annoying. New code. The new code is a combination of the code in post #34 and #44. There is no Sleep. The code works beautifully on my PC. Hopefully it also works on careca's PC. Now there are two purposes of the loop: If the COM event handler starts up before the Shell_Flyout window the loop waits for the window to open and the event handler can detect the open event. If the Shell_Flyout window opens before the COM event handler is ready the event handler is unable to detect the window open event. In this case the (already open) Shell_Flyout window is detected in the While loop. #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include "CUIAutomation2.au3" ; junkew #include "ObjectFromTag.au3" ; trancexx AutoItSetOption("MustDeclareVars", 1) Global Const $S_OK = 0x00000000 Global Const $E_NOINTERFACE = 0x80004002 Global Const $sIID_IUnknown = "{00000000-0000-0000-C000-000000000046}" Global $bShellFlyoutFound = False SetAssociations() Func SetAssociations() Local $sText1, $Vis ShellExecute(@WindowsDir & '\system32\control.exe', '/name Microsoft.DefaultPrograms /page pageFileAssoc') WinWaitActive("Set Associations", 'Set Associations', 10) Local $hWnd = WinGetHandle("[CLASS:CabinetWClass]", "Set Associations") If $hWnd <> 0 Or @error <> 0 Then Do $Vis = ControlCommand($hWnd, "", "[CLASS:Button; INSTANCE:1]", 'IsVisible') Until $Vis = 1 Sleep(100) Local $iCount = ControlListView($hWnd, "", "SysListView321", "GetItemCount") For $k = 0 To $iCount - 1 $sText1 = ControlListView($hWnd, "", "SysListView321", "GetText", $k, 0) If $sText1 = '.mp3' Then ControlListView($hWnd, "", "SysListView321", "Select", $k, $k) ConsoleWrite( "SysListView321, Item " & $k & ": " & $sText1 & @CRLF & @CRLF ) ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]") HandlePopupWindow() EndIf Next EndIf EndFunc Func HandlePopupWindow() ; Create custom UI Automation event handler Local $tIUIAutomationEventHandler, $oIUIAutomationEventHandler $oIUIAutomationEventHandler = ObjectFromTag( "oIUIAutomationEventHandler_", $dtagIUIAutomationEventHandler, $tIUIAutomationEventHandler, True ) If Not IsObj( $oIUIAutomationEventHandler ) Then Return ConsoleWrite( "$oIUIAutomationEventHandler ERR" & @CRLF ) ConsoleWrite( "$oIUIAutomationEventHandler OK" & @CRLF ) ; Create UI Automation object Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) ; Desktop Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement( $pDesktop ) $oDesktop = ObjCreateInterface( $pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oDesktop ) Then Return ConsoleWrite( "$oDesktop ERR" & @CRLF ) ConsoleWrite( "$oDesktop OK" & @CRLF ) ; Window open events ; This COM event handler detects the Shell_Flyout window open event and clicks the links in the window If $oUIAutomation.AddAutomationEventHandler( $UIA_Window_WindowOpenedEventId, $pDesktop, $TreeScope_Subtree, 0, $oIUIAutomationEventHandler ) Then Return ConsoleWrite( "$pIUIAutomationEventHandler ERR" & @CRLF ) ConsoleWrite( "$oIUIAutomationEventHandler OK" & @CRLF ) ; There are two purposes of the While loop below: ; 1) If the COM event handler starts up before the Shell_Flyout window the loop waits for the window. ; 2) If the Shell_Flyout window opens before the COM event handler is ready the event handler is unable ; to detect the window open event and therefore unable to detect the Shell_Flyout window. In this case ; the Shell_Flyout window is detected in the while loop. Local $pCondition = 0, $pCondition1, $pCondition2, $i While Not $bShellFlyoutFound And Sleep(10) ; Do this only once If Not $pCondition Then ; Condition to find Shell_Flyout window $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_WindowControlTypeId, $pCondition1 ) $oUIAutomation.CreatePropertyCondition( $UIA_ClassNamePropertyId, "Shell_Flyout", $pCondition2 ) $oUIAutomation.CreateAndCondition( $pCondition1, $pCondition2, $pCondition ) $i = $pCondition ? ConsoleWrite( "$pCondition OK" & @CRLF ) : ConsoleWrite( "$pCondition ERR" & @CRLF ) #forceref $i EndIf ; Find Shell_Flyout window Local $pWindow, $oWindow $oDesktop.FindFirst( $TreeScope_Children, $pCondition, $pWindow ) $oWindow = ObjCreateInterface( $pWindow, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) $i = IsObj( $oWindow ) ? ConsoleWrite( "$oWindow OK" & @CRLF ) _ : ConsoleWrite( "$oWindow ERR (Shell_Flyout window is not open)" & @CRLF ) If IsObj( $oWindow ) Then ; --- More apps --- ConsoleWrite( "--- More apps ---" & @CRLF ) ; Condition $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_HyperlinkControlTypeId, $pCondition ) If Not $pCondition Then Return ConsoleWrite( "$pCondition ERR" & @CRLF ) ConsoleWrite( "$pCondition OK" & @CRLF ) ; Find link Local $pLink, $oLink $oWindow.FindFirst( $TreeScope_Descendants, $pCondition, $pLink ) $oLink = ObjCreateInterface( $pLink, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oLink ) Then Return ConsoleWrite( "$oLink ERR" & @CRLF ) ConsoleWrite( "$oLink OK" & @CRLF ) ; Click (invoke) link Local $pInvoke, $oInvoke $oLink.GetCurrentPattern( $UIA_InvokePatternId, $pInvoke ) $oInvoke = ObjCreateInterface( $pInvoke, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern ) If Not IsObj( $oInvoke ) Then Return ConsoleWrite( "$oInvoke ERR" & @CRLF ) ConsoleWrite( "$oInvoke OK" & @CRLF ) $oInvoke.Invoke() ; --- Look for another app on this PC --- ConsoleWrite( "--- Look for another app on this PC ---" & @CRLF ) ; Condition $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_HyperlinkControlTypeId, $pCondition ) If Not $pCondition Then Return ConsoleWrite( "$pCondition ERR" & @CRLF ) ConsoleWrite( "$pCondition OK" & @CRLF ) ; Find link $oWindow.FindFirst( $TreeScope_Descendants, $pCondition, $pLink ) $oLink = ObjCreateInterface( $pLink, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oLink ) Then Return ConsoleWrite( "$oLink ERR" & @CRLF ) ConsoleWrite( "$oLink OK" & @CRLF ) ; Click (invoke) link $oLink.GetCurrentPattern( $UIA_InvokePatternId, $pInvoke ) $oInvoke = ObjCreateInterface( $pInvoke, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern ) If Not IsObj( $oInvoke ) Then Return ConsoleWrite( "$oInvoke ERR" & @CRLF ) ConsoleWrite( "$oInvoke OK" & @CRLF ) $oInvoke.Invoke() $bShellFlyoutFound = True EndIf WEnd $oUIAutomation.RemoveAutomationEventHandler( $UIA_Window_WindowOpenedEventId, $pDesktop, $oIUIAutomationEventHandler ) EndFunc Func oIUIAutomationEventHandler_HandleAutomationEvent( $pSelf, $pSender, $iEventId ) ; Ret: long Par: ptr;int ConsoleWrite( "oIUIAutomationEventHandler_HandleAutomationEvent: " & $iEventId & @CRLF ) If $iEventId = $UIA_Window_WindowOpenedEventId Then Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) $oSender.AddRef() ConsoleWrite( "Handle " & Ptr( _UIA_getPropertyValue( $oSender, $UIA_NativeWindowHandlePropertyId ) ) & @CRLF ) ConsoleWrite( "Name " & _UIA_getPropertyValue( $oSender, $UIA_NamePropertyId ) & @CRLF ) ConsoleWrite( "Class " & _UIA_getPropertyValue( $oSender, $UIA_ClassNamePropertyId ) & @CRLF ) ConsoleWrite( "Ctrl type " & _UIA_getPropertyValue( $oSender, $UIA_ControlTypePropertyId ) & @CRLF ) ConsoleWrite( "Ctrl name " & _UIA_getPropertyValue( $oSender, $UIA_LocalizedControlTypePropertyId ) & @CRLF ) ConsoleWrite( "Value " & _UIA_getPropertyValue( $oSender, $UIA_LegacyIAccessibleValuePropertyId ) & @CRLF ) ; Shell_Flyout popup? Local $sClassName, $hWindow $oSender.GetCurrentPropertyValue( $UIA_ClassNamePropertyId, $sClassName ) If $sClassName = "Shell_Flyout" Then $oSender.GetCurrentPropertyValue( $UIA_NativeWindowHandlePropertyId, $hWindow ) ; Create UI Automation object Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) ; Get UI Automation element from window handle Local $pWindow, $oWindow $oUIAutomation.ElementFromHandle( $hWindow, $pWindow ) $oWindow = ObjCreateInterface( $pWindow, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oWindow ) Then Return ConsoleWrite( "$oWindow ERR" & @CRLF ) ConsoleWrite( "$oWindow OK" & @CRLF ) ; --- More apps --- ConsoleWrite( "--- More apps ---" & @CRLF ) ; Condition Local $pCondition $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_HyperlinkControlTypeId, $pCondition ) If Not $pCondition Then Return ConsoleWrite( "$pCondition ERR" & @CRLF ) ConsoleWrite( "$pCondition OK" & @CRLF ) ; Find link Local $pLink, $oLink $oSender.FindFirst( $TreeScope_Descendants, $pCondition, $pLink ) $oLink = ObjCreateInterface( $pLink, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oLink ) Then Return ConsoleWrite( "$oLink ERR" & @CRLF ) ConsoleWrite( "$oLink OK" & @CRLF ) ; Click (invoke) link Local $pInvoke, $oInvoke $oLink.GetCurrentPattern( $UIA_InvokePatternId, $pInvoke ) $oInvoke = ObjCreateInterface( $pInvoke, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern ) If Not IsObj( $oInvoke ) Then Return ConsoleWrite( "$oInvoke ERR" & @CRLF ) ConsoleWrite( "$oInvoke OK" & @CRLF ) $oInvoke.Invoke() ; --- Look for another app on this PC --- ConsoleWrite( "--- Look for another app on this PC ---" & @CRLF ) ; Condition $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_HyperlinkControlTypeId, $pCondition ) If Not $pCondition Then Return ConsoleWrite( "$pCondition ERR" & @CRLF ) ConsoleWrite( "$pCondition OK" & @CRLF ) ; Find link $oSender.FindFirst( $TreeScope_Descendants, $pCondition, $pLink ) $oLink = ObjCreateInterface( $pLink, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oLink ) Then Return ConsoleWrite( "$oLink ERR" & @CRLF ) ConsoleWrite( "$oLink OK" & @CRLF ) ; Click (invoke) link $oLink.GetCurrentPattern( $UIA_InvokePatternId, $pInvoke ) $oInvoke = ObjCreateInterface( $pInvoke, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern ) If Not IsObj( $oInvoke ) Then Return ConsoleWrite( "$oInvoke ERR" & @CRLF ) ConsoleWrite( "$oInvoke OK" & @CRLF ) $oInvoke.Invoke() $bShellFlyoutFound = True EndIf EndIf Return $S_OK #forceref $pSelf EndFunc Func _UIA_getPropertyValue( $obj, $id ) Local $vVal $obj.GetCurrentPropertyValue( $id, $vVal ) Return $vVal EndFunc Func oIUIAutomationEventHandler_QueryInterface( $pSelf, $pRIID, $pObj ) ; Ret: long Par: ptr;ptr* Local $sIID = StringFromGUID( $pRIID ) If $sIID = $sIID_IUnknown Then ConsoleWrite( "oIUIAutomationEventHandler_QueryInterface: IUnknown" & @CRLF ) DllStructSetData( DllStructCreate( "ptr", $pObj ), 1, $pSelf ) oIUIAutomationEventHandler_AddRef( $pSelf ) Return $S_OK ElseIf $sIID = $sIID_IUIAutomationEventHandler Then ConsoleWrite( "oIUIAutomationEventHandler_QueryInterface: IUIAutomationEventHandler" & @CRLF ) DllStructSetData( DllStructCreate( "ptr", $pObj ), 1, $pSelf ) oIUIAutomationEventHandler_AddRef( $pSelf ) Return $S_OK Else ConsoleWrite( "oIUIAutomationEventHandler_QueryInterface: " & $sIID & @CRLF ) Return $E_NOINTERFACE EndIf #forceref $pSelf EndFunc Func oIUIAutomationEventHandler_AddRef( $pSelf ) ; Ret: ulong ConsoleWrite( "oIUIAutomationEventHandler_AddRef" & @CRLF ) Return 1 #forceref $pSelf EndFunc Func oIUIAutomationEventHandler_Release( $pSelf ) ; Ret: ulong ConsoleWrite( "oIUIAutomationEventHandler_Release" & @CRLF ) Return 1 #forceref $pSelf EndFunc Func StringFromGUID( $pGUID ) Local $aResult = DllCall( "ole32.dll", "int", "StringFromGUID2", "struct*", $pGUID, "wstr", "", "int", 40 ) If @error Then Return SetError( @error, @extended, "" ) Return SetExtended( $aResult[0], $aResult[2] ) EndFunc You must close the "Open with ..." dialog box after each run of the code. But you can leave the "Set Associations" window open. This is a little bit faster. AllCode2.7z
    1 point
  4. Again... what did you try already that isn't working? ..and I can't think of any automation issues that would need this amount of conversions anyways. Jos
    1 point
  5. No idea what you mean but it sounds like you are looking for a PerformMagic() function. Jos
    1 point
  6. Here are two functions to provide pixel-accurate height and width dimensions for a given string. The more commonly-used _GDIPlus_GraphicsMeasureString built-in UDF is problematic because it returns the width padded by roughly one en-space (for reasons related to the various ways Windows produces anti-aliased fonts). These are AutoIt translations of Pierre Arnaud's C# functions, described in his CodeProject article "Bypass Graphics.MeasureString limitations" The first is an all-purpose version that takes a window handle, string, font family, font size (in points), style, and (optionally) width of the layout column (in pixels) as parameters. The second, more efficient version is intended for applications where GDI+ fonts are already in use, and takes handles to the existing graphics context, string, font, layout and format as parameters. Both functions return a two-row array with the exact width [0] and height [1] of the string (in pixels). EDIT: (Note that some of the same anti-aliasing measurement issues still apply. I did my best to work around them, but the output of the function may still be off by a pixel or two. Buyer beware.) #include <GDIPlus.au3> #include <GUIConstantsEx.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StringInPixels ; Description ...: Returns a pixel-accurate height and width for a given string using a given font, style and size. ; Syntax ........: _StringInPixels($hGUI, $sString, $sFontFamily, $fSize, $iStyle[, $iColWidth = 0]) ; Parameters ....: $hGUI - Handle to the window. ; $sString - The string to be measured. ; $sFontFamily - Full name of the font to use. ; $fSize - Font size in points (half-point increments). ; $iStyle - Combination of 0-normal, 1-bold, 2-italic, 4-underline, 8-strikethrough ; $iColWidth - [optional] If word-wrap is desired, column width in pixels ; Return values .: 2-row array. [0] is width in pixels; [1] is height in pixels. ; Author ........: Tim Curran; adapted from Pierre Arnaud's C# function ; Modified ......: ; Remarks .......: This version is longer and less efficient but works for all purposes. ; Related .......: <https://www.codeproject.com/Articles/2118/Bypass-Graphics-MeasureString-limitations> ; Link ..........: ; Example .......: Example-StringInPixels.au3 ; =============================================================================================================================== #include <GDIPlus.au3> #include <GUIConstantsEx.au3> Func _StringInPixels($hGUI, $sString, $sFontFamily, $fSize, $iStyle, $iColWidth = 0) _GDIPlus_Startup() Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) ;Create a graphics object from a window handle Local $aRanges[2][2] = [[1]] $aRanges[1][0] = 0 ;Measure first char (0-based) $aRanges[1][1] = StringLen($sString) ;Region = String length Local $hFormat = _GDIPlus_StringFormatCreate() Local $hFamily = _GDIPlus_FontFamilyCreate($sFontFamily) Local $hFont = _GDIPlus_FontCreate($hFamily, $fSize, $iStyle) _GDIPlus_GraphicsSetTextRenderingHint($hGraphic, $GDIP_TEXTRENDERINGHINT_ANTIALIASGRIDFIT) _GDIPlus_StringFormatSetMeasurableCharacterRanges($hFormat, $aRanges) ;Set ranges Local $aWinClient = WinGetClientSize($hGUI) If $iColWidth = 0 Then $iColWidth = $aWinClient[0] Local $tLayout = _GDIPlus_RectFCreate(10, 10, $iColWidth, $aWinClient[1]) Local $aRegions = _GDIPlus_GraphicsMeasureCharacterRanges($hGraphic, $sString, $hFont, $tLayout, $hFormat) ;get array of regions Local $aBounds = _GDIPlus_RegionGetBounds($aRegions[1], $hGraphic) Local $aWidthHeight[2] = [$aBounds[2], $aBounds[3]] ; Clean up resources _GDIPlus_FontDispose($hFont) _GDIPlus_RegionDispose($aRegions[1]) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() Return $aWidthHeight EndFunc ;==>_StringInPixels ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StringInPixels_gdip ; Description ...: Returns a pixel-accurate height and width for a given string using a GDI+ font, layout and format ; Syntax ........: _StringInPixels_gdip($hGraphic, $sString, $hFont, $tLayout, $hFormat) ; Parameters ....: $hGraphic - Handle to a GDI+ graphics object. ; $sString - The string to be measured. ; $hFont - Handle to a GDI+ font. ; $tLayout - A $tagGDIPRECTF structure that bounds the string. ; $hFormat - Handle to a GDI+ string format. ; Return values .: 2-row array. [0] is width in pixels; [1] is height in pixels. ; Author ........: Tim Curran; adapted from Pierre Arnaud's C# function ; Modified ......: ; Remarks .......: This much more efficient version is for use with GDI+ fonts ; Related .......: ; Link ..........: <https://www.codeproject.com/Articles/2118/Bypass-Graphics-MeasureString-limitations> ; Example .......: Example-StringInPixels.au3 ; =============================================================================================================================== #include <GDIPlus.au3> #include <GUIConstantsEx.au3> Func _StringInPixels_gdip($hGraphic, $sString, $hFont, $tLayout, $hFormat) Local $aRanges[2][2] = [[1]] $aRanges[1][0] = 0 ;Measure first char (0-based) $aRanges[1][1] = StringLen($sString) ;Region = String length _GDIPlus_GraphicsSetTextRenderingHint($hGraphic, $GDIP_TEXTRENDERINGHINT_CLEARTYPEGRIDFIT) _GDIPlus_StringFormatSetMeasurableCharacterRanges($hFormat, $aRanges) ;Set ranges Local $aRegions = _GDIPlus_GraphicsMeasureCharacterRanges($hGraphic, $sString, $hFont, $tLayout, $hFormat) ;get array of regions Local $aBounds = _GDIPlus_RegionGetBounds($aRegions[1], $hGraphic) Local $aWidthHeight[2] = [$aBounds[2], $aBounds[3]] _GDIPlus_RegionDispose($aRegions[1]) Return $aWidthHeight EndFunc ;==>_StringInPixels_gdip _StringInPixels.au3 Example-StringInPixels.au3
    1 point
  7. It only looks that way at first . A lot of your code seemed to be to make the input box act like a combo box with accelerator keys to control it. I replaced it with a combo box, you can scroll through it with the mouse or arrow keys and it expands to show a list. I hope it functions the way you want compared with the first input box. Everyone has there own preferences on layout, so as long as your code is easily readable, is easy to maintain (even after it's not fresh in your mind) and understandable (more likely to get help here) your half way there. If you do add extra inputs like the unknown input parts, you can add them to the controls array. The declarations below are only there to show you the scope each control needs to be declared in. Don't declare the Globals inside the function, If that makes sense Good luck ;~ GUICtrlCreateLabel("", 16, 272, 36, 17) ;~ Global $id_unknown1_inp = GUICtrlCreateInput("", 72, 272, 161, 21) ; unknown2 ;~ GUICtrlCreateLabel("", 16, 304, 36, 17) ;~ Global $id_unknown2_inp = GUICtrlCreateInput("", 72, 304, 161, 21)
    1 point
×
×
  • Create New...