
Clicks mouse button(s).
MouseClick(click-type, modifiers)
(i) click-type a mouse button press.
(i) modifiers click variations for mouse button presses.
(i) @TRUE on success.; @FALSE on error.
This function performs a mouse click at the current cursor position.
"Modifiers" can be set to 0 if none are needed.
Click-types:
@LCLICK left click
@RCLICK right click
@MCLICK middle click
@LDBLCLICK left double-click
@RDBLCLICK right double-click
@MDBLCLICK middle double-click
Modifiers (multiple modifiers can be linked together with a logical OR, "|"):
@SHIFT hold down shift key
@CTRL hold down control key
@LBUTTON hold down left mouse button
@RBUTTON hold down right mouse button
@MBUTTON hold down middle mouse button
NOTE: The modifers are in effect until the click type is executed. [ For example, a Shift key plus a right mouse click would be: MouseClick(@RCLICK, @SHIFT)
Run("notepad.exe","")
Message("Notepad Running","We will now close it via a mouseclick on the close button")
winpos = WinPlaceGet(@NORMAL, "~Notepad")
; get coordinates for upper right corner of window
x = ItemExtract(3, winpos, " ") - 10
y = ItemExtract(2, winpos, " ") + 10
WinActivate("~Notepad")
MouseMove(x, y, "", "")
MouseClick(@LCLICK, 0)