Sign in to follow this  
Followers 0
sonicxtacy02

how do i search for an applications title and class info

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0