1

(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

Danyl Bekhoucha
  • 191
  • 1
  • 2
  • 8

2 Answers2

4

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)
Danyl Bekhoucha
  • 191
  • 1
  • 2
  • 8
1

The documentation for AutoKey's Mouse API can now be found here: https://autokey.github.io/api/mouse.html

Liam Bohl
  • 111