How to click on an image on the screen
Show a macro what a button looks like once, and it finds the button and clicks it wherever it is on the screen.
Updated 1 October 2026 · Clicking on images is free on every plan in Myna Recorder.
1. Why a recorded click misses
A recorded click goes to the same spot on the screen every time. Move the window, change the resolution or run the macro on another computer, and the click lands on something else. A click on an image does not depend on where things are: the macro looks for the picture each time and clicks wherever it is now.
2. Capture the image
Open the Images tab, press Crop new area, drag a box around the button and give it a name. Capture only the part that makes it recognisable, such as the label and the edge of the button. Background inside the picture stops it matching when the background changes.
3. Click it
In the Recorder tab, open Image in the step toolbar and choose Click it, then pick your image. In the Script tab it is one line:
click_crop("Save")
The step waits up to five seconds for the picture to appear, then clicks the middle of it. If the picture never shows up, the macro carries on with the next step. Add on_fail="label" to go somewhere else instead, or abort=True to stop the run.
4. Wait for something first
Wait until visible holds the macro until a picture appears, which is how a macro waits for a slow page or a long export instead of guessing with a fixed pause:
wait_for("Report ready", timeout_ms=60000)
click_crop("Download")
For something that only sometimes appears, an if_image block looks once and runs its steps only when the picture is there:
if_image("Update available"):
click_crop("Remind me later")
5. When it does not find the image
- confidence= sets how close the match must be. The default is 0.8, an 80% match. Lower it a little if a picture that is plainly there is missed.
- match="shape" compares outlines and ignores colour, for a button that changes colour when highlighted or in a dark theme.
- region=(x, y, width, height) looks in one part of the screen only, which is faster and avoids a similar picture elsewhere.
- x_offset= and y_offset= click beside the picture, for example on the box next to a label.
- timeout_ms= sets how long to keep looking.
A step can also find things by colour instead of by picture: give it a colour range and it acts on the middle of the biggest patch of that colour.
6. Plans and export
- Clicking on images, waiting for them and colour matching are free on every plan.
- A macro that clicks on images can be exported as one .exe on Basic and Pro, with its pictures inside the file.
- For something that is on screen only for a moment, a burst keeps photographing an area for a few seconds so you can pick the picture to keep. Bursts are part of Basic and Pro.