mikephn 0 Posted November 12, 2010 I'm automating the execution of a program. When it runs it does its thing, and then presents the results. Unfortunately, the only clear indication that it finished is that a WindowsForm10.STATIC text saying "Scanning" becomes hidden. In Window Info I can see the text moving from Visible Text to Hidden Text. However, I don't know how to tell if the control is hidden or not. How would you do it? Alternatively, I could check if a button that allows to progress further becomes active (it's grayed out when its scanning). Is that any easier? Share this post Link to post Share on other sites
water 2,393 Posted November 12, 2010 (edited) Please have a look at "ControlCommand". Example: $iVisible = ControlCommand ( "Your window title", "text in your window (optional)", controlID, "IsVisible")Returns 1 if Control is visible, 0 otherwise. "IsEnabled" returns 1 if Control is enabled, 0 otherwise. Edited November 12, 2010 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
wolf9228 67 Posted November 12, 2010 (edited) or #include <GUIConstantsEx.au3> GUICreate("My GUI Button") $Button_1 = GUICtrlCreateButton("Hide Button2", 10, 30, 100,30) $Button_2 = GUICtrlCreateButton("Button2",10,70,100,30) $Button_3 = GUICtrlCreateButton("Chike Button2 Is Hide",10,110,200,30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 GUICtrlSetState ($Button_2,$GUI_HIDE) Case $msg = $Button_3 $state = WinGetState(GUICtrlGetHandle($Button_2), "") If BitAnd($state,2) Then MsgBox(0, "MSG", "Button2 is Not Hide") Else MsgBox(0, "MSG", "Button2 is Hide") EndIf EndSelect WEnd Exit Edited November 12, 2010 by wolf9228 صرح السماء كان هنا Share this post Link to post Share on other sites