Result = WaitProgram(Program [, Timeout])Description
Halts the execution of the code until the specified program has ended or the optional timeout is reached.
Program The program to use. It must have been started before with RunProgram(). Timeout (optional) The timeout to use, in milliseconds.
Nonzero if the program has ended, zero if the timeout was reached.