waiting for a window to accept input

Discuss RoboTask here
Post Reply
BertPruim
Posts: 8
Joined: Tue Jan 09, 2007 9:07 pm
Location: Australia
Contact:

waiting for a window to accept input

Post by BertPruim »

Hi!
Another one.
I know that when i first open an application I can specift that I want to wait until the application is ready to receive input before the task continues.
I'd assumed that the 'wait for process' is the same thing but then for applications / processes already open.
I use a FoxPro based medical database program. I frequently must await a particular window to open before more keystrokes are pressed / data is entered. I must do this on multiple computers in my office, some of which are much faster than others.
If I use 'wait for process' in my FoxPro application, i cannot specify to wait until a particular window is active before data is entered.
Window Command / Check For Window don't appear to have the desired effect either...
What am i doing wrong?
Cheers, Bert 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

waiting for a window to accept input

Post by Oleg »

"Wait for process" action is not fit for this purpose. It only waits until the specified process will finished.

Use "Check for window" action. See algorithm below:

Run application
Simple loop // e.g. from 1 to 1000
   Check for window // and save result to variable
   if window is active
      break
   end if
   pause 0,5 sec
End Loop
do something else

This algorithm allows you to wait specified window so long as you wish.

Also see at the "Window Watcher" triggering event. You can launch your task only when the specified window will appeared.
Last edited by Oleg on Sun Feb 25, 2007 7:07 am, edited 1 time in total.
Post Reply