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...") |
(→Return Value) |
||
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 === |
Revision as of 22:53, 25 August 2013
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");