Match Image Activity
The Match Image activity locates a specified image on the screen. It returns the X and Y coordinates of the image's position, enabling further automation actions based on its location.
| Field | Description | Requirement |
|---|---|---|
| File name | The full path to the image file to be matched on the screen. This field is mutually exclusive with Base64. | Required |
| Base64 | The Base64 string representation of the image file to be matched. This field is mutually exclusive with File name. | Required |
| X-coordinate | The X-coordinate of the top-left corner of the rectangular region on the screen where the image search will be limited. This field must be used in conjunction with Y-coordinate, Width, and Height. | Optional |
| Y-coordinate | The Y-coordinate of the top-left corner of the rectangular region on the screen where the image search will be limited. This field must be used in conjunction with X-coordinate, Width, and Height. | Optional |
| Width | The width of the rectangular region on the screen where the image search will be limited. This field must be used in conjunction with X-coordinate, Y-coordinate, and Height. | Optional |
| Height | The height of the rectangular region on the screen where the image search will be limited. This field must be used in conjunction with X-coordinate, Y-coordinate, and Width. | Optional |
| Retry count | The maximum number of attempts to find the image on the screen. | Optional |
| Match score | A decimal value (0.0 to 1.0) representing the minimum similarity percentage required for an image match. | Optional |
| Find first on top | When multiple matches are found, setting this to true returns the coordinates of the uppermost and leftmost match. | Optional |
| Return x-position | The variable name to store the X-coordinate of the found image. | Required |
| Return y-position | The variable name to store the Y-coordinate of the found image. | Required |
Action Types & Examples
Return x-position
- Format: digit
- Example Result: 700
Return y-position
- Format: digit
- Example Result: 400
Implementation Examples
Field Setup - File name: C:\Temp\test.jpg - Base64: iVBORw0KGgoAAAANSUhEUgAAAGYAAAAsCAYAAACXHM1oAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhcwAAE - X-coordinate: 700 - Y-coordinate: 400 - Width: 100 - Height: 50 - Retry count: 3 - Match score: 0.80 - Find first on top: true
Execution Parameters - Return x-position: xPositionValue - Return y-position: yPositionValue
Technical Notes
The coordinates found by the Match Image activity can be used in other activities, such as the Mouse activity within Keyboard & Mouse Operations, to perform actions like clicking on the identified image location. Images can be converted to Base64 strings using various online tools. The
HeightandWidthparameters must be integer values. The GIF file format is not supported by the Match Image activity.