Sets the mouse speed that will be used if unspecified in Click and MouseMove/Click/Drag.

SetDefaultMouseSpeed Speed



Type: Integer

The speed to move the mouse in the range 0 (fastest) to 100 (slowest).

Note: A speed of 0 will move the mouse instantly.


SetDefaultMouseSpeed is ignored for SendInput/Play modes; they move the mouse instantaneously (except when SendInput reverts to SendEvent; also, SetMouseDelay has a mode that applies to SendPlay). To visually move the mouse more slowly -- such as a script that performs a demonstration for an audience -- use SendEvent "{Click 100 200}" or SendMode "Event" (optionally in conjuction with BlockInput).

If this function is not used, the default mouse speed is 2. The built-in variable A_DefaultMouseSpeed contains the current setting.

The functions MouseClick, MouseMove, and MouseClickDrag all have a parameter to override the default mouse speed.

Whenever Speed is greater than zero, SetMouseDelay also influences the speed by producing a delay after each incremental move the mouse makes toward its destination.

Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this function. That default may be changed by using this function during script startup.

SetMouseDelay, SendMode, Click, MouseClick, MouseMove, MouseClickDrag, SetWinDelay, SetControlDelay, SetKeyDelay, SetKeyDelay


Causes the mouse cursor to be moved instantly.

SetDefaultMouseSpeed 0