;/ Author : Bingo ; The WaitProgramInitialisation function waits Until The specified process is waiting For user input ; with no input pending, Or Until The time-out interval has elapsed. ; If this process is a console application or does not have a message queue, ; WaitProgramInitialisation returns immediately. Procedure WaitProgramInitialisation(Handle) While WaitForInputIdle_(Handle, 1) > 0 Debug "Initialisation ..." Delay(1) Wend EndProcedure ;/ Test ret = RunProgram("Calc.exe") If ret WaitProgramInitialisation(ret) EndIf Debug "Launched & Ready."