Sign in to follow this  
Followers 0
oana1111

Wait for different windows

3 posts in this topic

Hi guys,

I need to wait for a window. The problem is I get two choices. For instance, an update may be successful or may require me to change the update server. And this is just one example. So, I thought about doing smth like:

wait for (window1) or (window2)

if window1 is active then action1

else if window2 is active then action2

Unfortunately the windows don't have a common title. That would have been easier.

I think it should be something simple... just don't see it.

Do you have any suggestions? Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

This is probably not the best solution, maybe it will work for you.

while 1
if winexist("window1") then 
  Action1
  Exitloop
elseif winexist("window2") then
  Action2
  Exitloop
Endif
sleep(200)
wend
Edited by blademonkey

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

You're right, it's not quite the happiest choice, but if I know exactly what the windows are, and hope the builds won't change that much, it will get the job done.

Thanks for the help, I'll try that. :)

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