AutoIt MouseClick Function

Reference on the AutoIt MouseClick Function, including useful example, and a list of allowed parameters.

The AutoIt MouseClick Function is used to send mouse clicks. The mouse will move to a specified location on the screen, and then fire off as many clicks as given.

Parameters

The MouseClick function accepts 4 Parameters, the first the button to click with, the second and third is the pixel based left and right position on the screen, while the final value to be given is the movement speed of the mouse.

left || right || middle || main || menu || primary || secondary The mouse button to be clicked.
pixels The (x) position from the left in pixels.
pixels The (y) position from the top in pixels.
1-100 The movement speed of the mouse, takes a value from 1 to 100.

Some users change their primary mouse button from left to right, so if you want to be sure that the button you intend is used, you may want to use the primary and secondary settings.

AutoIt MouseClick Example

The below script will click one time on a given location on the screen, and move to the location with a speed of 50.

MouseClick("primary", 200, 150, 50)

See also

  1. Mouse Clicker script - By BlueBoden