Relative click
Relative clicks are built from a live detection result instead of a fixed screen point. They only work when placed inside a nested image detection block. If the target moves around the screen, the click dynamically moves with it.
Relative Positioning
- Reference Anchor: Chooses which point on the detected result (like Center, Top Left, Bottom Right) the offsets start from.
- Offset (X/Y): Fine-tunes the click position from the anchor. Positive X moves right, negative moves left. Positive Y moves down, negative moves up.
- Visual Offset: Detects the target on the current screen and lets you visually drag the click point inside it. Tapping Apply writes the exact needed X and Y offsets automatically.
- Preview: Tap the
icon to see exactly where the final click will land with the current anchor and offsets.
Important: Both Preview and Visual Offset will only work if the reference image is currently visible and successfully detected within the search region on your device's screen.
Task Timing & Randomization
- Hold Duration (ms): How long the finger stays pressed down. Increase to simulate a long press.
- Repeat Count: How many times this exact tap should be sequentially repeated.
- Delay Before / Post Wait (ms): Injects custom pause times (in milliseconds) immediately before or after the click occurs.
- Randomize Position (±px): Scatters the tap within this many pixels of the target so it doesn't land on the identical spot every time.
Note: Because relative clicks are anchored to a detected template match, they naturally adapt to different screen sizes and are inherently device-independent.
Code Equivalent
Find a template and click its center:
const match = new Region(100, 100, 400, 400).find('image 1');
if (match) match.click();Click at an offset from the match:
if (match) click(match.x + 50, match.y - 20);Click with full options:
if (match) click(match.x, match.y, { duration: 50, repeat: 1, waitBefore: 0, waitAfter: 0, radius: 0 });