Skip to content

aos mouse

Pointer position and clicks

3 commands. Run aos mouse --help for the same list from the binary, or see every group.

Pointer position and clicks. click --app=X --find=Label presses a control through the accessibility API, with no pointer movement and no focus change. Coordinates are global screen pixels; --monitor makes them relative to one monitor.

Click, optionally moving to a point first

needs a display

Terminal window
aos mouse click [<x> <y>] [--button=left|right|middle] [--double] [--monitor=<n>] | --app=<name>|--title=<s> --find=<text> [--role=<r>] [--focus] [--json]
flag values meaning
<x> Optional positional argument
<y> Optional positional argument
--button left, right, middle Optional
--double Optional
--monitor <n> Optional
--app <name> One of these is required
--title <s> One of these is required
--find <text> Required
--role <r> Optional
--focus Optional
--json Optional
Terminal window
aos mouse click
aos mouse click --app=Calculator --find=7 --role=button # AXPress / UIA Invoke: no pointer, no focus
aos mouse click 400 300 --double
aos mouse click --button=right

Move the pointer

needs a display

Terminal window
aos mouse move <x> <y> [--monitor=<n>]
flag values meaning
<x> Required positional argument
<y> Required positional argument
--monitor <n> Optional
Terminal window
aos mouse move 400 300
aos mouse move 400 300 --monitor=2

Print the pointer position as x y

needs a display

Terminal window
aos mouse position
Terminal window
aos mouse position # 784 539