By using this site you agree to the use of cookies.

Learn more

Share via:

AutoIt MouseDown Function

The MouseDown function can be used to click and hold a mouse button.

Edited: 2017-03-25 02:21

The AutoIt MouseDown function is used to perform a MouseDown event, which can later be released by a MouseUp event.

If you want to make a selection, or perform a mouse drag and drop operation, then consider using the MouseClickDrag Function instead.

Parameters

This function only takes 1 parameter, being the button to press down.

left || right || middle || main || menu || primary || secondaryThe button to be pressed down.

AutoIt MouseDown Example

MouseDown("secondary")
Sleep(1000) ; time to hold the button in milliseconds
MouseUp("secondary")