How to wait for a pop-up message?

Discuss RoboTask here
Post Reply
arold_ite
Posts: 6
Joined: Thu Mar 30, 2006 2:17 am

How to wait for a pop-up message?

Post by arold_ite »

Hi, I have "move-to" and "click" actions set-up for a specific message box.  But, when the actions execute, the message box doesn't YET exist.
The application that I'm starting goes away and does some processing and after an unknown amount of time, it comes back with a message box, to which I should press OK.
I never how long it will take for this message box to appear.  So, how can I tell RoboTask to WAIT for this message box to appear?
Thanks
Arold
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

How to wait for a pop-up message?

Post by Oleg »

Simplest solution:
place some pause before mouse movements and keystrokes (see Pause action).

Another way:
use the following algorithm

simple loop from 1 to 1000 //for example
   if {IsWindowVisible(Caption Of Your Dialog)} then
      break
   else
      pause 100 ms
   end if
end loop
do keystrokes and mouse actions

this block waits until your window will appear.
Post Reply