Sets the mouse speed that will be used if unspecified in Click, MouseMove, MouseClick, and MouseClickDrag.
SetDefaultMouseSpeed Speed
Type: Integer
The speed to move the mouse in the range 0 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly.
Type: Integer
This function returns the previous setting.
If SetDefaultMouseSpeed is not used, the default mouse speed is 2.
SetDefaultMouseSpeed is ignored for the modes SendInput and SendPlay; 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).
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