Eli Posted January 7, 2006 Share Posted January 7, 2006 How would I keep checking ControlCommand($window, "", controlID, "IsEnabled", "") ? I want to keep a GUI visible until an edit field in another program becomes disabled. $x = ControlCommand($window, "", controlID, "IsEnabled", "") it seems as tho If, For, and Do loops only checks it that first time Link to comment Share on other sites More sharing options...
ChrisL Posted January 7, 2006 Share Posted January 7, 2006 (edited) How would I keep checking ControlCommand($window, "", controlID, "IsEnabled", "") ? I want to keep a GUI visible until an edit field in another program becomes disabled. $x = ControlCommand($window, "", controlID, "IsEnabled", "") it seems as tho If, For, and Do loops only checks it that first time Use a while loop While 1 $x = ControlCommand($window, "", controlID, "IsEnabled", "") If $x = 0 then (0 or what ever it would return I'm not sure of the value it would return without looking) What ever you want it to do goes here and if you want it to stop checking after this then add exitloop on the next line Exitloop Else Sleep (100) Endif Wend Edited January 7, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Valuater Posted January 7, 2006 Share Posted January 7, 2006 (edited) Maybe While 1 $func1 = ControlCommand($window, "", controlID, "IsEnabled", "") If $func1 = 1 Then ExitLoop Sleep(200) WEnd or While ControlCommand($window, "", controlID, "IsEnabled", "") <> 1 Sleep(100) Wend 8) Edited January 7, 2006 by Valuater Link to comment Share on other sites More sharing options...
ChrisL Posted January 7, 2006 Share Posted January 7, 2006 Maybe While 1 $func1 = ControlCommand($window, "", controlID, "IsEnabled", "") If $func1 = 1 Then ExitLoop Sleep(200) WEnd or While ControlCommand($window, "", controlID, "IsEnabled", "") <> 1 Sleep(100) Wend 8) Oh yeah.. much more economical [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
MHz Posted January 8, 2006 Share Posted January 8, 2006 While IsEnabled, Sleep and loop to check again. While ControlCommand($window, "", controlID, "IsEnabled", "") Sleep(100) Wend Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now