Syntax
WaitForProcessReady ProcessID=<pid> [Timeout=<secs>]Description
Waits until the specified process is waiting for user input with no input pending, or until the time-out interval has elapsed.Parameters
ProcessID=<pid>
- The process ID obtained from a Command statement.
Timeout=<secs>
- Optional. The number of seconds to wait for the process to exit before continuing anyway. The TimedOut intrinisic variable can be used to determine whether the wait timed out or not. The default value is zero, meaning if the process is not now ready a timeout will immediately occur.
Remarks
If the process does not exist, the wait is immediately satisfied and the TimedOut intrinsic variable is set to True.Example
WaitForWindow Caption="*Notepad*" Result=hwnd
WaitForProcessReady ProcessID=WindowProcess hwnd Timeout=60The above statements start the Windows Notepad program on the specified file and then wait 60 seconds for the program to be ready to accept input.