Returns an array listing the currently running processes (names and PIDs).
ProcessList ( ["name"] )
| name | [optional] If a name is given only processes of the same name will be returned. |
| Success: | An array of process names and PIDs (See Remarks). |
| Failure: | @error is set to 1 when the array cannot be built. |
; List all processes
Local $list = ProcessList()
For $i = 1 To $list[0][0]
MsgBox(0, $list[$i][0], $list[$i][1])
Next
; List just notepad.exe processes
$list = ProcessList("notepad.exe")
For $i = 1 To $list[0][0]
MsgBox(0, $list[$i][0], $list[$i][1])
Next