The coordinate strategy determines "how coordinates are converted when the runtime environment differs from the design environment". MacroAI offers two strategies:
Quick rule of thumb: if your target program "looks the same size at different resolutions, just in a different position" → use desktop offset. If "the whole view gets bigger or smaller" → use uniform scaling.
Switch it in Project Settings (Ctrl+,) → Region settings.
This is the most common issue, and it's usually caused by the run region not being calibrated. Follow these steps:
If it's still offset after calibration:
MacroAI has two region concepts:
If you run on the same computer with the window in the same position, the two are identical and no calibration is needed.
Situations that require calibration:
Calibration only needs to be done once — the result is saved with the project. You won't need to recalibrate the next time you open the same project (unless the environment changes again).
Android phones have highly fragmented aspect ratios (16:9, 19.5:9, 20:9...), so a game usually behaves in one of three ways on different devices:
Practical advice:
MacroAI has built-in DPI correction. DPI is already factored into the coordinate scaling system, so under normal circumstances you don't need to worry about it.
When an image isn't found, it's usually unrelated to DPI and more likely an image quality issue. If certain images aren't found, try re-capturing the template images.
Multi-monitor note: if your two monitors use different DPI scaling (e.g. primary at 125%, secondary at 100%), avoid moving the target window across screens.
Because the core assumption of uniform scaling is: the view scales by the same factor in both the X and Y directions (scale_x = scale_y).
If the design region is 1920×1080 (16:9) but you calibrate a 1920×1200 (16:10) region, then X scales by 1.0× while Y scales by 1.11× — the view is stretched non-uniformly, and coordinate conversion will be wrong.
That's why MacroAI locks the aspect ratio during calibration. You can only adjust the region's size and position, not its ratio. This protects the accuracy of coordinate conversion.
If your target program really does stretch non-uniformly (very rare), consider switching to desktop offset mode, or recreate the design region at the actual ratio.
Signs that you should switch:
Impact of switching:
Advice: choose the right strategy when you create the project. If unsure, pick uniform scaling for games/full-screen and desktop offset for windowed programs. After switching, it's best to test the entire flow once.
By default, every node follows the project's global coordinate strategy. But individual nodes can set a different strategy on their own — this is the "coordinate strategy override" (transform_policy).
Example scenarios:
In the node configuration dialog, find the "Coordinate Strategy" dropdown and select "Uniform scaling" or "Desktop offset" to override. Selecting "Follow project" uses the global setting.
Note: this is a Pro feature. In most cases you won't need it — it's only necessary when "a single project mixes scaled and non-scaled content".