AutoIT: Enumerating all Windows
Posted by Trevor Sullivan on 2010/04/09
Here is a short script I wrote using AutoIT, which enumerates all of the windows, to the StdOut stream:
ConsoleWrite(“Enumerating windows”)$AllWindows = WinList()ConsoleWrite(“Found ” & UBound($AllWindows) & ” windows”)for $i = 0 to UBound($AllWindows) – 1ConsoleWrite(@lf & “Name: ” & $AllWindows[$i])ConsoleWrite(@lf & “HWND: ” & $AllWindows[$i])nextConsoleWrite(@lf & “Completed listing windows.”)
Note: Please ensure that you check the “console” option when compiling this script for execution. If you do not check this box, there will be no StdOut stream created, which means you will get no output.