The AutoIt MouseClickDrag function can be used to move objects on the screen, and to make selections.
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 || secondary||The mouse button to be clicked before the drag.|
|pixels,pixels||The top and left position to start from in pixels|
|pixels,pixels||The top and left position wheres to end the drag.|
|1-100||The 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)