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
Image-based targeting: click wherever a captured image appears #87
Fixed coordinates break as soon as a window moves, a dialog appears in a different place, or the user runs on another monitor layout. Clicking "wherever this button image appears" makes routines robust and moves the app toward light, legitimate desktop automation (testing, data entry, repetitive office tasks), a much larger audience than click-speed users.
Rationale
PyScreeze, already a locked dependency through PyAutoGUI, provides locateOnScreen / locateCenterOnScreen (faster and with a confidence threshold when OpenCV is installed).
The picker can capture a reference image by dragging a rectangle.
New target mode "Image": capture a template with a drag-select overlay; store it as PNG next to settings, referenced from profiles.
A watcher thread searches the screen (or a chosen region) at a modest rate; the click loop clicks the latest match centre, or waits/stops when there is none.
Settings: confidence (if OpenCV is available), search region, offset from the image centre.
Measure the cost and document it in docs/PERFORMANCE.md; keep it optional so the base exe size doesn't grow unless OpenCV is bundled deliberately.
Same safety rules as everything else: all stop paths, limits and the runaway guard apply.
Done when
A user can capture a button image, move the window around, and the run keeps clicking the button wherever it is, waiting when it's hidden.
Needs a decision before implementation: fast enough image search needs OpenCV (or at least NumPy). PyScreeze's pure-Python fallback takes seconds per search on a 1080p screen, too slow for a click loop, and bundling OpenCV adds tens of MB to the single exe. Options: (a) bundle opencv-python-headless and accept the larger download, (b) make image targeting an optional feature for source/pipx installs only, (c) do a narrower version that searches only a small user-chosen region with pure Pillow.
Activity
TMHSDigital commentedon Oct 5, 2026
Needs a decision before implementation: fast enough image search needs OpenCV (or at least NumPy). PyScreeze's pure-Python fallback takes seconds per search on a 1080p screen, too slow for a click loop, and bundling OpenCV adds tens of MB to the single exe. Options: (a) bundle opencv-python-headless and accept the larger download, (b) make image targeting an optional feature for source/pipx installs only, (c) do a narrower version that searches only a small user-chosen region with pure Pillow.