Core Function WinList
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> WinList ( <title>, <text> ) </pre> === Description === Retrieves a list of windows. === Parameters === ==== Title ==== The title of the window. ==== Text ==== Option...") |
(→Example) |
||
Line 39: | Line 39: | ||
{ | { | ||
List( $Title, $HWND ) = $pList; | List( $Title, $HWND ) = $pList; | ||
− | If( | + | If( IsWindowVisible($HWND) ) |
println("Title '$Title' HWND '$HWND'"); | println("Title '$Title' HWND '$HWND'"); | ||
} | } |
Revision as of 15:36, 4 December 2011
WinList ( <title>, <text> )
Contents |
Description
Retrieves a list of windows.
Parameters
Title
The title of the window.
Text
Optional; The text of the window to read.
Return Value
Success: Returns an array of matching window titles and handles.
Failure: Returns an empty array.
Remarks
None.
See "WinTitleMatchMode" in Opt
Example
Opt( "WinDetectNoTitle", 0 ); // Do not check windows that have no title at all Opt( "WinWaitDelay", 0 ); $i = 0; foreach ( WinList() as $pList ) { List( $Title, $HWND ) = $pList; If( IsWindowVisible($HWND) ) println("Title '$Title' HWND '$HWND'"); } Function IsWindowVisible($HWND) { If ( WinGetState($HWND) & 2 ) Return 1; Else Return 0; }