Jump to content
Sign in to follow this  
qwertylol

Wait until a window does not exist

Recommended Posts

qwertylol

Do

Sleep (1000)

Until WinExists ( "Firefox" ) == 0

What I want to to wait until a window DOES NOT exist, yet we don't have a command ready to do that.

The above does not work. How do I do it properly?

Share this post


Link to post
Share on other sites
Generator

Do

Sleep(1000)

$WinExist=WinExists("Firefox")

Until $WinExist=0

Share this post


Link to post
Share on other sites
gamerman2360

Opt("WinTitleMatchMode", 2)
Do
Sleep (1000)

Until WinExists ( "Firefox" ) == 0

Share this post


Link to post
Share on other sites
ResNullius

Or more concisely :

Opt("WinTitleMatchMode", 2)
Do
Sleep (1000)

Until NOT WinExists ( "Firefox" )

I use this kind of construct all the time and find the "NOT" makes code a little easier to follow

Share this post


Link to post
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
Sign in to follow this  

×