sonicxtacy02 Posted October 25, 2006 Share Posted October 25, 2006 i'm creating a gui that one would use to find the window title and class of a given application. the person would enter the file path to the .exe and my script would return the information to the GUI. My problem is i dont know how to search for the window title and class one i open the application (hidden). Is this possible with autoit? Link to comment Share on other sites More sharing options...
PaulIA Posted October 25, 2006 Share Posted October 25, 2006 To find the window handle, you can use: WinGetHandle ( "title" [, "text"] )oÝ÷ Ù:+y§mç%j˱ú+k§v2¢çëjëh×6WinGetClassList ( "title" [, "text"] ) See the AutoIt help file for information on both commands. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
PaulIA Posted October 25, 2006 Share Posted October 25, 2006 Which looks something like this: ; ================================================================================================= ; Description ..: Retrieves the name of the class to which the specified window belongs ; Parameters ...: $hWnd - Handle of window ; Return values : If the function succeeds, the return value is the window class name otherwise the ; return value will be "". ; ================================================================================================= Func _GetClassName($hWnd) Local $pBuffer, $rBuffer $rBuffer = DllStructCreate("char[4096]") $pBuffer = DllStructGetPtr($rBuffer ) DllCall("User32.dll", "int", "GetClassName", "hwnd", $hWnd, "ptr", $pBuffer, "int", 4096) Return DllStructGetData($rBuffer, 1) EndFunc Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
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