Retrieves the Process ID (PID) associated with a window.
WinGetProcess ( "title" [, "text"] )
| title | The title of the window to read. See Title special definition. |
| text | [optional] The text of the window to read. |
| Success: | Returns a numeric Process ID (PID). |
| Failure: | Returns -1. |
Run("notepad.exe")
WinWait("[CLASS:Notepad]")
Local $pid = WinGetProcess("[CLASS:Notepad]")
MsgBox(4096, "PID is", $pid)