Method Reference
WinList
Retrieves a list of windows
WinList "title" [, "text"]
Parameters
title | The title of the window to find. |
text | Optional: The text of the window to find. |
Return Value
Success: | Returns a 2 dimensional array containing the window titles and corresponding handles. The number of entries is in element 0,0 (see example). |
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control") ' Find all instances of the notepad window val = oAutoIt.WinList("[CLASS:Notepad]") For i = 1 to val(0,0) WScript.Echo "Title:" & val(0,i) & " - Handle:" & val(1,i) Next ' Find all windows (may be hundreds!) val = oAutoIt.WinList("[ALL]") For i = 1 to val(0,0) WScript.Echo "Title:" & val(0,i) & " - Handle:" & val(1,i) Next