Function Reference


ProcessExists

Checks to see if a specified process exists.

ProcessExists ( "process" )

Parameters

process The name or PID of the process to check.

Return Value

Success: the PID of the process.
Failure: 0 if process does not exist.

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.

The process is polled approximately every 250 milliseconds.

Related

ProcessClose, ProcessWait, ProcessWaitClose, WinExists, ProcessList

Example

#include <MsgBoxConstants.au3>

If ProcessExists("notepad.exe") Then ; Check if the Notepad process is running.
    MsgBox($MB_SYSTEMMODAL, "", "Notepad is running")
Else
    MsgBox($MB_SYSTEMMODAL, "", "Notepad is not running")
EndIf