
This command uses the sending method set by SendMode. In other words, the cursor will be moved from its current position by X pixels to the right (left if negative) and Y pixels down (up if negative).

R: The X and Y coordinates will be treated as offsets from the current mouse position. If blank or omitted, the X and Y coordinates will be used for absolute positioning. Otherwise, specify one of the following letters:ĭ: Press the mouse button down but do not release it (i.e. If blank or omitted, each click consists of a down-event followed by an up-event. To visually move the mouse more slowly - such as a script that performs a demonstration for an audience - use SendEvent or SendMode Event (optionally in conjuction with BlockInput).

Speed is ignored for SendInput/Play modes they move the mouse instantaneously (though SetMouseDelay has a mode that applies to SendPlay). A speed of 0 will move the mouse instantly. Otherwise, specify the speed to move the mouse in the range 0 (fastest) to 100 (slowest), which can be an expression. If blank or omitted, the default speed (as set by SetDefaultMouseSpeed or 2 otherwise) will be used. Otherwise, specify the number of times to click the mouse button or turn the mouse wheel, which can be an expression. Coordinates are relative to the active window unless CoordMode was used to change that. Otherwise, specify the X and Y coordinates to which the mouse cursor is moved prior to clicking, which can be expressions. If blank or omitted, the cursor's current position is used. To compensate automatically for cases where the user has swapped the left and right mouse buttons via the system's control panel, use the Click command instead. ClickCount is the number of notches to turn the wheel. : Specify WheelLeft (or WL) or WheelRight (or WR) to push the wheel left or right, respectively (but these have no effect on operating systems older than Windows Vista). Mouse wheel: Specify WheelUp or WU to turn the wheel upward (away from you) specify WheelDown or WD to turn the wheel downward (toward you). Otherwise, specify the button to click or the rotate/push direction of the mouse wheel.īutton: Left, Right, Middle (or just the first letter of each of these) or X1 (fourth button) or X2 (fifth button).

If blank or omitted, it defaults to Left (the left mouse button). MouseClick, WhichButton, X, Y, ClickCount, Speed, DownOrUp, Relative Parameters WhichButton Note: The Click command is generally more flexible and easier to use.

MouseClick - Syntax & Usage | AutoHotkey MouseClickĬlicks or holds down a mouse button, or turns the mouse wheel.
