WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 1999:04:15:16:53:34
Last Updated: 1999:04:15:16:53:34