AutoIT Geek Posted December 2, 2005 Posted December 2, 2005 (edited) any quicker, shorter, less messy, whatever any improvments are welcome this code runs on v3.1.1.91 expandcollapse popup#include <array.au3> Global $Controls[ 1 ], $NULL = '0x00000000' Func EnumControls( $FirstChild ) Local $Child[ 3 ], $Temp[ 3 ] $Child[ 0 ] = $FirstChild Do _ArrayAdd( $Controls, $Child[ 0 ] ) $Temp = DllCall( 'USER32.DLL', 'hwnd', 'GetWindow', 'hwnd', $Child[ 0 ], 'int', 5 ); GW_CHILD If $Temp[ 0 ] <> $NULL Then EnumControls( $Temp[ 0 ] ) $Child = DllCall( 'USER32.DLL', 'hwnd', 'GetWindow', 'hwnd', $Child[ 0 ], 'int', 2 ); GW_HWNDNEXT Else $Child = DllCall( 'USER32.DLL', 'hwnd', 'GetWindow', 'hwnd', $Child[ 0 ], 'int', 2 ); GW_HWNDNEXT EndIf Until $Child[ 0 ] == $NULL EndFunc Run( $WinTitle ) $Parent = DllCall( 'USER32.DLL', 'hwnd', 'FindWindow', 'int', 0, 'str', $WinTitle ); <-- $Child = DllCall( 'USER32.DLL', 'hwnd', 'GetWindow', 'hwnd', $Parent[ 0 ], 'int', 5 ); GW_CHIILD If $Child[ 0 ] <> $NULL Then EnumControls( $Child[ 0 ] ) _ArrayDisplay( $Controls, ' Handle ' ) Edited December 2, 2005 by AutoIT Geek
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now