Sign in to follow this  
Followers 0
qwertylol

Wait until a window does not exist

5 posts in this topic

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

Do

Sleep(1000)

$WinExist=WinExists("Firefox")

Until $WinExist=0

Share this post


Link to post
Share on other sites

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

Until WinExists ( "Firefox" ) == 0

Share this post


Link to post
Share on other sites

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  
Followers 0