You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Conditional clicking: only click while a pixel matches a color #80
A bigger bet that turns a timer-driven clicker into a light, safe automation tool: only click when the screen shows what you expect. Examples: click "Continue" only when its pixel turns green, stop when a progress bar's end pixel changes, click only while a dialog is visible. It also improves safety, because a run stops doing harm when the target UI goes away (window closed, layout changed) instead of clicking blindly.
Rationale
PyAutoGUI (via PyScreeze, already a locked dependency) provides pixel() / pixelMatchesColor(); reading one pixel is cheap.
The picker overlay already knows the exact screen point; it can sample the color at pick time.
The engine has a natural hook: a check before _perform_burst, similar to _should_pause_for_foreground.
Suggested approach
Optional condition per run (and later per sequence step): "pixel at (x, y) matches color C within tolerance T".
Behavior when it does not match: wait (pause, shown as a Paused status) or stop (end with a clear reason, e.g. "Stopped: target changed").
UI: an "Only when..." row in Advanced with a "Sample color" button that reuses the picker and shows a swatch.
Keep the check rate-limited and measured so it does not hurt high-cps runs; note the cost in docs/PERFORMANCE.md.
Done when
A user can pick a point, sample its color, and have clicking pause or stop when that pixel changes, with tests that mock pixel() and cover both behaviors.
Activity