# Function Reference

ControlClick

Sends a mouse click command to a given control.

ControlClick ( "title", "text", controlID [, button] [, clicks]] )

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.
button | [optional] The button to click, "left", "right" or "middle". Default is the left button.
clicks | optional] The number of times to click the mouse. Default is 1.

Return Value

Success: | Returns 1.
Failure: | Returns 0.

Remarks

The control might first need to be given focus with the ControlFocus command.
Simulating a click on a control is only 100% accurate when the control's parent window is active - this is done automatically. Nothing will occurs if the control is disabled.

Related

ControlCommand, ControlFocus, MouseClick

Example

ControlClick("Untitled -", "", "MDIClient1")