Function Reference


WinGetClassList

Retrieves the classes from a window.

WinGetClassList ( "title" [, "text"] )

Parameters

title The title/hWnd/class of the window to get the classes. See Title special definition.
text [optional] The text of the window to get the classes. Default is an empty string. See Text special definition.

Return Value

Success: a string containing the window classes read.
Failure: "" and sets the @error flag to non-zero if the criteria does not match a window.

Remarks

Class names are linefeed (@LF) separated. WinGetClassList() works on both minimized and hidden windows. Up to 64KB of text can be retrieved.    If multiple windows match the criteria, the classes are read from the most recently active window.

Related

ControlCommand, WinGetText

Example

#include <MsgBoxConstants.au3>

Example()

Func Example()
        ; Run Notepad
        Run("notepad.exe")

        ; Wait 10 seconds for the Notepad window to appear.
        Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)

        ; Retrieve the classlist of the Notepad window using the handle returned by WinWait.
        Local $sClassList = WinGetClassList($hWnd)

        ; Display the classlist.
        MsgBox($MB_SYSTEMMODAL, "", $sClassList)

        ; Close the Notepad window using the handle returned by WinWait.
        WinClose($hWnd)
EndFunc   ;==>Example