Get mouse position
Remember where the pointer is.
- Where
- + Add actionKeyboard & mouseGet mouse position

Get mouse position reads where the pointer is and stores it in a variable. A macro that moves the mouse around can put it back afterwards, and a script can compute a target from it.
Settings
Section titled “Settings”| Setting | What it does |
|---|---|
| Remember as | The variable’s name. It gets the position as x,y, and name.x and name.y hold the two numbers on their own. |
| Scope | This run keeps the variable to this macro, Everywhere shares it with all macros. See variables. |
How it runs
Section titled “How it runs”- The action is instant. Coordinates are pixels from the top-left corner of the main display, the same ones Mouse sequence takes.
- When the position cannot be read, the action logs it and the variable keeps its old value.
Example
Section titled “Example”Keep the pointer where the user left it while a macro clicks around:
- Get mouse position, Remember as
before. - A Mouse sequence with the clicks, ending in Move to
{{before.x}},{{before.y}}.
Related
Section titled “Related”- Mouse sequence
- Get window — the position of a program’s window, as
name.xandname.y - Variables and placeholders