_ProcessGetProcessId

Gets process id of given process name, process name may include path

Miscellaneous.au3
_ProcessGetProcessId( $ProcessName )

parameters

$ProcessName Name of process (executable)

return value

integer value Process Id or 0 if not found or -1 if process list couldn't be built

related

_WindowFromProcessId

example

_ProcessGetProcessId( "WordPad.exe" ) ; returns the process id if WordPad was started