Core Function ProcessID
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> ProcessID( <name> ) </pre> === Description === Gets the process ID of a given name . === Parameters === ==== name ==== The name of the process to check. === Return V...") |
(→Return Value) |
||
Line 17: | Line 17: | ||
Success: Returns the PID of the process. | Success: Returns the PID of the process. | ||
− | Failure: Returns | + | Failure: Returns @PTRZero if process does not exist. |
=== Remarks === | === Remarks === |
Revision as of 00:04, 26 August 2013
ProcessID( <name> )
Contents |
Description
Gets the process ID of a given name .
Parameters
name
The name of the process to check.
Return Value
Success: Returns the PID of the process.
Failure: Returns @PTRZero if process does not exist.
Remarks
Process names are executables without the full path, e.g., "notepad.exe" or "winword.exe"
If multiple processes have the same name, the one with the highest PID is returned--regardless of how recently the process was spawned.
PID is the unique number which identifies a Process.
Example
If ($PID = ProcessID("notepad.exe")) { MsgBox("Notepad is running and its PID is '$PID'"); } else { MsgBox("Notepad not is running."); }