Image found
Passes when a saved picture appears on the screen or in the front window.
image is on the screen
Keyboard Maestro: ScreenImage (Contains, DoesNotContain)
Details #
Captures the screen (or the front window) and searches it for your picture. It passes when the best match scores at or above threshold. Name the picture with image, or put the same keys in a locator with role image. A name is looked up in the image library; a path starting with / is used as is.
threshold runs from 0.3 to 0.99 and defaults to 0.85. scope is screen (default) or window. pick chooses between several matches: best (default), top, bottom, left, right.
Every condition accepts "negate": true, which flips the verdict. The trace records what was compared before the flip, so a negated condition that blocks a macro still shows the real values.
Conditions in an Only if list combine with all: every one must pass, and an empty list always passes. An if step or a repeat loop takes a match of all (default) or any.
The trace shows found, score, threshold, and the match position x and y when found. A miss still records the closest score, which helps when tuning threshold.
In a dry run nothing is captured. The condition answers with sample (default true) and the trace shows simulated.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
image | text | Library name or absolute path. | ||
locator | locator | |||
pick | one of | best top bottom left right | ||
sample | yes / no | The answer used in a dry run. | ||
scope | one of | screen window | ||
threshold | number | |||
unique | yes / no |
Examples #
- Press ⌃⌥J
- If ‹image› is on the screen
- Show “Play button on screen”