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-12-19 17:31

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

After sending a MouseDown event, you would typically also want to send 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.


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

Sleep(1000) ; time to hold the button in milliseconds