Core Function ProcessWait
From Sputnik Wiki
(Difference between revisions)
(→Remarks) |
|||
Line 26: | Line 26: | ||
Process names are executables without the full path, e.g., "notepad.exe" or "winword.exe" | Process names are executables without the full path, e.g., "notepad.exe" or "winword.exe" | ||
− | |||
− | |||
PID is the unique number which identifies a Process. | PID is the unique number which identifies a Process. |
Revision as of 20:23, 7 December 2011
ProcessWait( <pid/name>, <timeout> )
Contents |
Description
Pauses the current thread until a given process exists or optional the timeout expires.
Parameters
pid/name
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 the PID.
Failure: Returns 0 if wait timed out.
Remarks
Process names are executables without the full path, e.g., "notepad.exe" or "winword.exe"
PID is the unique number which identifies a Process.
A PID can be obtained through the ProcessExists or Run commands.
In order to work under Windows NT 4.0, ProcessClose requires the file PSAPI.DLL.
The process is polled approximately every 250 milliseconds.
Example
ProcessWait("notepad.exe"); ProcessWaitClose($PID)