Add auto-advance: click Next, scroll to top, capture next page
After each capture the controller asks the vision model to locate a 'Next' control (returned as normalized screen coordinates), clicks it via OS input, scrolls to top, and continues the loop. Configurable via SCREEN_LEADS_AUTO_NEXT / _NEXT_LOAD_PAUSE / _MAX_AUTO_NEXT, with a per-run safety cap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,12 @@ SCROLL_AMOUNT = int(_env("SCREEN_LEADS_SCROLL_AMOUNT", "800")) # pyautogui scro
|
||||
SCROLL_PAUSE = float(_env("SCREEN_LEADS_SCROLL_PAUSE", "0.8")) # settle time (s)
|
||||
WATCH_INTERVAL = float(_env("SCREEN_LEADS_WATCH_INTERVAL", "2.0")) # loop tick (s)
|
||||
|
||||
# Auto-advance: after capturing a profile, look for a "Next" control, click it,
|
||||
# scroll back to the top, and keep going — walking paginated results hands-free.
|
||||
AUTO_NEXT = _env("SCREEN_LEADS_AUTO_NEXT", "true").lower() in ("1", "true", "yes", "on")
|
||||
NEXT_LOAD_PAUSE = float(_env("SCREEN_LEADS_NEXT_LOAD_PAUSE", "2.5")) # wait after click (s)
|
||||
MAX_AUTO_NEXT = int(_env("SCREEN_LEADS_MAX_AUTO_NEXT", "25")) # safety cap per run
|
||||
|
||||
# What to do when the front tab is not an enabled site's target page.
|
||||
# "stop" -> end the run (the requested behaviour)
|
||||
# "wait" -> pause and keep polling until a valid page appears
|
||||
|
||||
Reference in New Issue
Block a user