Jump to content

how do i search for an applications title and class info


Recommended Posts

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...