Enumerates all windows
#include <WinAPISysWin.au3>
_WinAPI_EnumWindows ( [$bVisible = True [, $hWnd = Default]] )
$bVisible | [optional] Window selection flag: True - Returns only visible windows False - Returns all windows |
$hWnd | [optional] Handle of the starting windows (default Desktop windows) |
_WinAPI_EnumWindowsPopup, _WinAPI_EnumWindowsTop
#include <Array.au3>
#include <WinAPISysWin.au3>
Example()
Func Example()
Local $aWindows = _WinAPI_EnumWindows()
Local $aResult[$aWindows[0][0]][5]
For $i = 1 To $aWindows[0][0]
$aResult[$i - 1][0] = $aWindows[$i][0]
$aResult[$i - 1][1] = $aWindows[$i][1]
$aResult[$i - 1][2] = WinGetTitle($aWindows[$i][0])
$aResult[$i - 1][3] = WinGetText($aWindows[$i][0])
$aResult[$i - 1][4] = WinGetProcess($aWindows[$i][0])
Next
_ArrayDisplay($aResult, "_WinAPI_EnumWindows", Default, Default, Default, "#|Handle|Class|Title|Text|Process")
EndFunc ;==>Example