Core Function WinGetProcess
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> WinGetProcess ( <title>, <text> ) </pre> === Description === Retrieves the Process ID (PID) associated with a window. === Parameters === ==== Title ==== The title of t...") |
m (1 revision) |
||
(2 intermediate revisions by one user not shown) | |||
Line 21: | Line 21: | ||
Success: Returns a numeric Process ID (PID). | Success: Returns a numeric Process ID (PID). | ||
− | Failure: Returns | + | Failure: Returns @PTRZero. |
=== Remarks === | === Remarks === |
Latest revision as of 12:38, 14 June 2015
WinGetProcess ( <title>, <text> )
Contents |
Description
Retrieves the Process ID (PID) associated with a window.
Parameters
Title
The title of the window.
Text
Optional; The text of the window to read.
Return Value
Success: Returns a numeric Process ID (PID).
Failure: Returns @PTRZero.
Remarks
Use WinGetProcess ("") to get active window.
See "WinTitleMatchMode" in Opt
Example
$pid = WinGetProcess("Untitled - Notepad"); MsgBox("PID is: $pid");