How to Loop Forever until a Window Appears
Keywords: winwaitexist
Question:
I'm currently using WinWaitExist, but the window it is waiting for
never exists if my users hit the Cancel button rather then entering
their username and password. Is there another way to structure my
code to handle this situation. When they do login, a new window appears.
Answer:
Something like:
while 1
if !WinExist("The Window You're Waiting to Appear")
...some other action here, like Sendkeys to regenerate the screen
Message("Password Entry", "You MUST enter your username and password.")
else
if winexist("The Window You're Waiting to Appear") then break
endif
TimeDelay(2)
endwhile
Article ID: W13371
Filename: Loop Forever until a Window Appears.txt