By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

AutoIt MouseClickDrag Function

Reference on the AutoIt MouseClickDrag Function. The MouseClickDrag Function can be used to make a selection.

Edited: 2015-02-12 23:58

The AutoIt MouseClickDrag Function can be used to move object on the screen and make selections.

Parameters

The MouseClickDrag function accepts 6 Parameters, these are all shown below. The pixel values are the x and y positions to start and end the dragging operation from.

left || right || middle || main || menu || primary || secondaryThe mouse button to be clicked before the drag.
pixels,pixelsThe top and left position to start from in pixels
pixels,pixelsThe top and left position wheres to end the drag.
1-100The movement speed of the mouse, takes a value from 1 to 100. A speed of 0 will move the pointer instantly.

If you want to be sure that the primary button is used, regardless of the users setting, then avoid using left, as some users might make the right mouse button their primary instead of the normal left.

AutoIt MouseClickDrag Example

MouseClickDrag("left", 0, 0, 250, 250)