Pauses script execution until a given process does not exist.
ProcessWaitClose "process" [, timeout]
Parameters
process | The name or PID of the process to check. |
timeout | [optional] Specifies how long to wait (default is to wait indefinitely). |
Return Value
Success: Returns 1.
Remarks
Process names are executables without the full path, e.g., "notepad.exe" or "winword.exe"
Related
ProcessClose, ProcessExists, ProcessWaitClose, RunWait, WinWaitClose
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
'waits until no instance of notepad.exe exists
oAutoIt.ProcessWaitClose "notepad.exe"
' This will wait until this particular instance of notepad has exited
PID = oAutoIt.Run("notepad.exe")
oAutoIt.ProcessWaitClose(PID)