Check Region
Tests a rectangle of the screen against a rule — no template image required.
Purpose
Checks a rectangle without any captured image: is it bright enough, the right average colour, a specific pixel colour, or has it changed since the last check?
Use it to detect state that has no distinct icon — a health bar that emptied, a screen that faded in, a light that turned on, an area that is animating.
When to use it
- Detecting a bar, gauge, or meter changing level.
- Confirming a screen faded in or out.
- Detecting any movement in an area, without knowing what it will look like.
- Checking a status light or colour-coded indicator.
When not to use it
- To find an icon or button — use Find Image.
- To read a value — use Read Text.
- On a busy, detailed area. Averaging a complex region washes out the signal.
Requirements
A connected device. No template asset needed — that is the point of this node.
How it runs
As with Find Image, a not-passed is not an error: the route is Failure but the status is success, so it never trips retry or the consecutive-failure guardrail.
Settings
| Setting | Type | Range | Default | What it does |
|---|---|---|---|---|
| Region | rectangle | percentage of screen | — | Required. The area to measure |
| Rule type | choice | see below | — | Required. What to measure |
| Expected | object | — | — | Required. The target value to compare against |
| Tolerance | number | ≥ 0 | — | How far the measurement may differ and still pass |
| Timeout | integer | 100–120000 ms | flow default | How long to keep checking |
| Poll interval | integer | 50–5000 ms | flow default | How often to re-capture |
The four rules
| Rule | Measures | Typical use |
|---|---|---|
colorAverage | The region's average colour | A colour-coded panel or indicator |
brightness | The region's average brightness | A bar that lights up, a screen fading |
pixelColor | One specific pixel's colour | A small status light |
changedSinceLastFrame | Whether the region differs from the previous poll | Any motion or animation |
changedSinceLastFrame is the interesting one
This rule compares each capture against the previous poll's capture. You do not need to know what the area will look like — only that it will be different.
That makes it the right tool for "wait until the animation stops" or "detect that something is moving", which no template can express.
Tolerance
A tolerance of 0 almost never passes against a real screen: compression, anti-aliasing and subtle gradients mean measurements are never exactly equal. Allow slack.
Start generous, then tighten until it stops passing when it shouldn't.
Ports
| Port | Taken when | Required |
|---|---|---|
| Success | The rule passed | Yes |
| Failure | The rule did not pass before the timeout (status still success) | No |
| Cancelled | The run was stopped mid-check | No — never followed |
| Fatal | Capture failed, the region is invalid, or the rule / expected value could not be parsed | No — never followed |
Basic example
Detect that a health bar is still lit:
- Region: a small patch of the bar
- Rule: Brightness
- Expected:
0.5 - Tolerance:
0.15
Success while the bar is lit; Failure when it goes dark.
Realistic example — wait for an animation to finish
A fixed Wait guesses. This measures:
Here Failure is the good outcome: "the region stopped changing" means the animation finished. This inverted reading is common with changedSinceLastFrame, and it is why wiring both ports thoughtfully matters.
Advanced example — a gauge threshold
Detect that a resource bar has dropped below roughly a quarter full by measuring a patch a quarter of the way along it:
- Region: a small patch at the 25% mark of the bar
- Rule: Colour average
- Expected: the bar's "empty" background colour
- Tolerance: moderate
Success means the bar no longer reaches that point.
This works where no icon exists and no text is shown — exactly the gap this node fills.
Best practices
- Keep the region small and on a stable, representative patch. Averaging a large area destroys the signal.
- Always wire Failure. Not-passed leaves through it, and an unwired port ends the run.
- Give tolerance real slack. Zero tolerance is a bug, not precision.
- Use
changedSinceLastFramefor settling, and remember that "not changed" arrives on Failure. - Prefer Find Image when an icon exists. Template matching is more specific and easier to reason about.
- Test on both states. A rule that passes when it should is only half the check — confirm it fails when it should too.
Performance notes
- Check Region is cheaper than both Find Image and OCR — it measures pixel statistics over a crop rather than matching or recognising.
- Cost scales with region area. Small patches are very fast.
- Poll interval is capped at 5000 ms here (tighter than other detection nodes), because the rules are cheap and meant to be sampled frequently.
changedSinceLastFrameholds the previous capture for comparison, so it costs one extra retained crop.
Memory notes
- Every poll captures a fresh frame; frames are transient.
- The change rule retains the previous poll's crop for the comparison — bounded by the region size, so keep regions small.
Common mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Wiring only Success | Not-passed ends the run | Wire Failure |
| Region too large | The signal is averaged away | Small, representative patch |
| Tolerance of 0 | Never passes on a real screen | Allow slack |
| Using it to find an icon | Fragile and imprecise | Use Find Image |
| Misreading the change rule | "Settled" arrives on Failure | Wire it as the success path for settling |
| Expecting it to read a value | It measures pixels, not text | Use Read Text |
Troubleshooting
It always passes. Tolerance is too wide, or the region includes so much variety that the average sits near your expected value regardless. Shrink the region.
It never passes. Tolerance is too tight. Widen it and confirm the measured value with Test Node.
The change rule always says "changed". The region includes a clock, an animated background, or a shimmer effect. Move it to a stable patch.
It exits Fatal. The region is invalid, or the expected value cannot be parsed for the chosen rule.
FAQ
Does a not-passed count as an error?
No — the status stays success.
Can I check several regions in one node? No. Use one node per region, or use a multi-region Read Text if the values are textual.
What does changedSinceLastFrame compare against on the first poll?
It needs a previous capture to compare with, so the comparison becomes meaningful from the second poll onwards.
Is this faster than Find Image? Yes, noticeably — no template matching is involved.
Related nodes
- Find Image — when the target has a distinct appearance
- Read Text — when you need the value
- Wait — the blind alternative to a settle check
- If — branch on this node's outcome later
Related pages
- Execution Model — status versus route
- Retry and Failures — verification patterns