Jump to content

IsEnabled checked till 0


Eli
 Share

Recommended Posts

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

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...