Shift Coordinates
Shift Coordinates
Section titled “Shift Coordinates”The Shift Coordinates action adds a constant offset to every screen coordinate that follows it, until you turn the offset off with End Coordinate Shift. Use it to translate a stretch of a recorded macro to a new location without editing each action – for example if elements inside a UI have moved.
Overview
Section titled “Overview”The action comes as a pair:
- Shift Coordinates – push a (dx, dy) offset onto a stack. Every subsequent action that names a spot on the screen has the offset added to it at run time.
- End Coordinate Shift – pop all offsets off the stack, returning coordinates to their original values.
Shifts stack – a second Shift Coordinates while one is active adds its offset on top of the existing one. End Coordinate Shift clears the whole stack.
In the + Add Action menu, both live under Utilities.
What gets shifted
Section titled “What gets shifted”| Shifted | Not shifted |
|---|---|
| Mouse Click, Double-Click, Triple-Click, Down, Up | Anything without a screen coordinate – keyboard input, waits |
| Mouse Move and Mouse Drag, both endpoints | Resize Window, Reposition Window, and the window geometry of Open Application |
| Check Color coordinate | A click set to relative to the cursor – it has no absolute position to move |
| The point a Scroll is aimed at | A Scroll’s distance – it says how far the content moves, not where anything is |
| Capture Text, Find Text, Find Image areas | Monitor and window targets in Where to look – those resolve at run time and already follow their screen or window |
| Take Screenshot and Screen Recording areas, when set to a fixed area | Widths and heights – a shift moves an area, it never resizes it |
A Window Anchor is the exception among the window actions: it moves with the shift, so the window and the actions inside it stay together – see A Window Anchor moves with the shift. Resize Window, Reposition Window and Open Application stay out: they set a window’s size or place deliberately, and a shift has no business overriding that.
A search that follows a window is never shifted
Section titled “A search that follows a window is never shifted”When a screen-reading action’s Where to look is set to a monitor or a window rather than a fixed area, a shift above it changes nothing. That is deliberate: “look inside this window” means wherever that window happens to be, and sliding the rectangle off it by a fixed offset could only ever make it miss. The editor shows this the same way – such an action is drawn at its resolved position with no shifted outline and no label.
A Window Anchor moves with the shift
Section titled “A Window Anchor moves with the shift”A Window Anchor puts its window back where it was recorded. When a shift is active above it, the anchor puts the window at the recorded position plus the shift instead – so the window and everything you do inside it move together, and a click keeps landing on the same button.
That gives a simple rule:
| Where you put the shift | What moves |
|---|---|
| Before the anchor | The window too. Everything stays consistent – use this when the whole thing should run somewhere else. |
| After the anchor | Only the actions. The window stays where it was recorded – use this when something inside the window moved, like a collapsed sidebar. |
If the window can’t be placed exactly where it was asked to go – the recorded monitor is gone, say – ClicKey measures the difference and corrects everything after it, exactly as it does without a shift. The two corrections add up cleanly; nothing is counted twice.
The pre-playback window check still tests the recorded position, not the shifted one. That only affects whether it thinks a window needs your attention before the run, not where the anchor finally puts it.
How to use
Section titled “How to use”Wrap a stretch of clicks in a shift
Section titled “Wrap a stretch of clicks in a shift”- Click + Add Action → Shift Coordinates.
- Enter the X offset and Y offset in pixels (negatives go left or up). Both fields accept fixed numbers or number expressions.
- After the actions you want shifted, add + Add Action → End Coordinate Shift to reset.
Use as a “translate this whole macro” wrapper
Section titled “Use as a “translate this whole macro” wrapper”Put a Shift Coordinates at the very top and an End Coordinate Shift at the bottom. The entire macro runs at the offset position.
Build offsets from a variable
Section titled “Build offsets from a variable”Use the Variables and Expressions system to drive the offsets from a computed value. For example, set {windowOffsetX} and {windowOffsetY} based on a Find Image step’s saved coordinates, then Shift Coordinates by {windowOffsetX}, {windowOffsetY}.
Options & settings
Section titled “Options & settings”Shift Coordinates
Section titled “Shift Coordinates”| Option | What it does |
|---|---|
| X offset | Horizontal pixel offset to add to every subsequent click and mouse move. Fixed number or number expression. Negative values shift left. |
| Y offset | Vertical pixel offset to add to every subsequent click and mouse move. Fixed number or number expression. Negative values shift up. |
End Coordinate Shift
Section titled “End Coordinate Shift”End Coordinate Shift has no fields – it just clears the entire shift stack when reached.
Seeing the shift while you edit
Section titled “Seeing the shift while you edit”Selecting an action normally outlines on screen where it will act. Under a Shift Coordinates that outline would be the recorded position, which is not where the action actually lands – so the editor shows both:
- Orange, solid, labelled “Shifted +120 / −40” – where the action will really act, recorded position plus every shift above it.
- Grey, dashed, labelled “Recorded” – the original position. It no longer counts; it is there so you can see how far the shift moved things.
This is what makes a freshly typed offset checkable: type a value, select the action below it, and see whether the orange outline lands where you meant.
When there is no single position
Section titled “When there is no single position”Sometimes there is no one answer. If a Shift Coordinates and the selected action sit inside the same repeating group, the action lands somewhere different on every pass – there is no single spot to draw. The same is true for a shift whose repeat count is random or comes from an expression, for a shift inside a conditional branch above the action, and for an offset expression that can’t be worked out in the editor.
In those cases ClicKey does not guess. Only the grey recorded outline is drawn, labelled “Shifted at run time – position varies”, so you know the outline is not where the action will act.
Offsets written as expressions resolve against the variables’ default values, the same convention the editor’s other previews and Test buttons use.
A disabled Shift Coordinates counts for nothing, exactly as during playback – disabling one is a quick way to see what a stretch of the macro does without it. The same goes for a shift inside a disabled group or branch. And a disabled shift inside a loop no longer makes the positions below it uncertain either, because there is nothing left to repeat.
Notes & limitations
Section titled “Notes & limitations”- Shift Coordinates affects every screen coordinate, not just clicks. See What gets shifted for the exact list. A field driven by an expression is shifted too – the offset is added on top of whatever the expression works out to.
- End Coordinate Shift clears the entire stack. There’s no per-action “pop one shift” – End is “back to zero.” If you want partial undo, push a counter-offset instead.
- A Shift Coordinates inside a loop accumulates per iteration if you don’t reset it. Every pass adds the offset again on top of the existing shift – the edit dialog says “Repetitions add up”, and its info icon explains the stacking with an example. If accumulating isn’t what you want, end the shift inside the loop body (or use the variable-driven pattern with an absolute offset each pass).
- During playback the row shows the effective total. Once a Shift Coordinates action has run, its row gets a purple badge with the cumulative shift, e.g. “Total shift: +100, +300” – styled like the value badge on Set Variable rows. In a loop you can watch it grow per pass; the badge keeps the final total after the run ends.
- The stored coordinates are never rewritten. The macro file keeps the original values; the shift is applied while the macro runs. The editor shows you the effect anyway – see Seeing the shift while you edit.
- Offset expressions resolve when Shift Coordinates runs. If the X or Y offset references variables, the current values at that point in playback are used until End Coordinate Shift clears the shift.
- Shifts apply to all mouse coordinates regardless of which window the click targets. If a window has moved by exactly the shift amount, perfect. If different windows have moved different amounts, you need different shifts (or to use Window Anchors and let ClicKey translate via its own window/monitor-aware logic).
- Negative offsets are allowed, and useful for moving content up and left.
- Pre-Playback Window Check uses original coordinates, not shifted ones, when checking whether windows are reachable. The shift is only applied once the macro starts running.
Related
Section titled “Related”- Mouse Input – the clicks and drags a shift moves.
- Window Anchors – automatic, more robust window targeting; often the better fix when a window moved.
- Variables and Expressions – drive shift offsets from computed values.
- Find Image – find a known landmark to anchor the shift on.
- Resize and Reposition Window – alternative: move the window back instead of offsetting clicks.