Jump to content

Recommended Posts

Posted

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

Posted (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 by ChrisL
Posted (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 by Valuater

NEWHeader1.png

Posted

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 :P
Posted

While IsEnabled, Sleep and loop to check again.

While ControlCommand($window, "", controlID, "IsEnabled", "")
   Sleep(100)
Wend

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...