(Autokey's documentation is discontinued so i am posting here since it's a Linux software and there is no forum available)

I use Autokey to create macros for games, but i haven't found in the documentation the script to:

  • do a right click

  • do a left click

  • do a middle click

  • move the cursor to a specific location

up vote 1 down vote accepted

To click use this two commands:

mouse.click_relative_self(x, y, button)

mouse.click_absolute(x, y, button)

The first command is relative (to click near the mouse's current location) the second is absolute (from the entire screen). The button takes 3 arguments:

1: left click

2: middle click

3: right click

For example in a strategy game to perform a right click at the mouse's current location do this:

mouse.click_relative_self(0, 0, 3)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.