# SetDefaultMouseSpeed

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

    SetDefaultMouseSpeed, Speed

### Parameters

Speed | The speed to move the mouse in the range 0 (fastest) to 100 (slowest). Note: a speed of 0 will move the mouse instantly. This parameter can be an expression.

### Remarks

SetDefaultMouseSpeed is ignored for SendInput/Play modes; they move the mouse instantaneously (however, 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 command is not used, the default mouse speed is 2. The built-in variable A_DefaultMouseSpeed contains the current setting.

The commands 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 command. That default may be changed by using this command in the auto-execute section (top part of the script).

### Related

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

### Example

    SetDefaultMouseSpeed, 0 ; Move the mouse instantly.