If Image Exists
Command description
Check whether the specified image exists on the Entire Screen, in the Active Window, or in a Specified Window. The indented child commands run when the selected Exists or Does Not Exist condition is met.
- You can choose Color or Grayscale matching. In Grayscale mode, the image is converted to grayscale before matching.
- To match an image regardless of its color, such as a logo shown in different colors, choose Grayscale.
- This command compares images through Python OpenCV and is sensitive to image and screen size. If the screen resolution differs between the computer where the workflow is built and the computer where it runs, the image may not match.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Search Scope | enum | Entire Screen, Active Window, Specified Window |
| Window Object | WindowInstance | Required when Search Scope is Specified Window |
| Image Name | str | Captured image name |
| Exists | enum | Exists, Does Not Exist |
| Match Mode | enum | Auto, Color, Grayscale |
| Image Wait Duration | number | Maximum time to wait for the image, in seconds |
Command Output Parameters
None
Parameter description
-
If Exists is selected, the indented subcommand will run when the image appears. If the image does not appear before the image wait duration expires, the condition is not met and the subcommand will not run.
-
If Does Not Exist is selected, the indented subcommand will run when the image is absent. If the image remains present when the image wait duration expires, the condition is not met and the subcommand will not run.
Type Definition Reference
Prefer element capture when the target can be identified as an element. Image matching is sensitive to display conditions and is not guaranteed to be exact.
Example
Determine whether a specified window contains an image: