Page 1 of 1

waiting for a window to accept input

Posted: Sun Feb 25, 2007 2:33 am
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 

waiting for a window to accept input

Posted: Sun Feb 25, 2007 3:01 am
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.