WaitProgramInitialisation
Posted: Tue Nov 29, 2005 11:04 am
Code updated for 5.20+
This function is usefull for sending key, and be sure the program is initialised.
Thanks to Bingo
This function is usefull for sending key, and be sure the program is initialised.
Code: Select all
;/ 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."