Function Reference


ControlGetHandle

Retrieves the internal handle of a control.

ControlGetHandle ( "title", "text", controlID )

Parameters

title The title of the window to access.
text The text of the window to access.
controlID The control to interact with. See Controls.

Return Value

Success: Returns the handle (HWND) value.
Failure: Returns "" (blank string) and sets @error to 1 if no window matches the criteria.

Remarks

This function returns a HWND/Handle value.

Related

None.

Example


Run("notepad.exe")
WinWait("[CLASS:Notepad]")
Local $hHandle = ControlGetHandle("[CLASS:Notepad]", "", "Edit1")
MsgBox(0, "ControlGetHandle Example", "The control handle of Edit1 is: " & $hHandle)