- ADB client (connect, tap, swipe, screencap, app control) - Vision module (in-memory screenshot + OpenCV template matching) - Action loader (auto-discovers .py files in actions/) - Engine (screenshot → detect → act loop with YAML playbook) - 12 built-in actions: tap, click, wait, swipe, find, find_and_click, wait_until, click_seq, keyevent, app, log - Example custom action template - Debug screenshot tool for template creation - Detailed plan.md with 20 actions across 9 phases - Sample playbook with 10 steps
20 lines
543 B
Python
20 lines
543 B
Python
"""Action: click_seq — tap a sequence of coordinates with optional delay."""
|
|
import time
|
|
|
|
|
|
class Action:
|
|
name = "click_seq"
|
|
|
|
def run(self, ctx, params):
|
|
points = params.get("points", params.get("coords", []))
|
|
delay = params.get("delay", 0.5)
|
|
|
|
for pt in points:
|
|
if isinstance(pt, (list, tuple)):
|
|
x, y = pt[0], pt[1]
|
|
else:
|
|
continue
|
|
ctx["adb"].tap(x, y)
|
|
ctx["log"].info("click_seq: tap(%d, %d)", x, y)
|
|
time.sleep(delay)
|