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
Sequences 2.0: per-step actions and wait-for-image / wait-for-pixel steps #119
Sequences are linear and "always click" (README ~line 290). Most macro requests ("click here, type F5, wait until the Save button appears, click it") need per-step actions and waits. The engines for all of these already exist (hold, key, pixel condition, image match), so this is the highest-leverage feature: it covers most of what people want from a macro tool without a scripting language and its support and security load.
Who it's for
Users automating multi-window chores, testers, accessibility users who want one hotkey to run a routine.
Recorder keeps producing click steps; the step editor adds the other types.
Every wait step must honor all stop paths (stop, emergency, failsafe, limits, pause when unfocused) and have an optional timeout that ends the run with a clear reason.
Profiles/export carry the new schema (bump export version).
Write a short design note in docs/ARCHITECTURE.md first, given the stop-path table.
Done when
A design comment is agreed, then the schema, editor UI, engine support, migration tests and README section ship.
Wait until the image is on screen; optionally click it (click: true)
wait_pixel
x, y, color, tolerance, timeout_ms, on_timeout, delay_ms
Wait until the pixel matches
on_timeout is stop (end the run with a clear reason) or skip (go on to the next step). timeout_ms 0 means wait until stopped.
Engine
_perform_sequence dispatches on type. Click, hold and key reuse _perform_click (spread and the failsafe corner check apply as today).
Wait steps poll every 100 ms with _stop_event.wait. Before each poll they re-check stop requests, click and time limits, pause when unfocused and the failsafe, so every stop path in the ARCHITECTURE table still holds mid-wait. Image waits grab their own region on the click thread (about 17 ms each since Image watcher screenshots the whole virtual desktop 10 times a second #97), so no extra watcher thread per step is needed.
Click and time limits count click, hold and key actions; waits don't count as clicks.
Pause when unfocused: windows under click and hold points count as before. Key steps and waits don't add a window, so the run stays on the windows it already knows.
A wait that times out with stop ends the run as completed, with the message "Step 4: the image didn't appear within 10 s".
UI
The step list shows the type: 3. key ctrl+s, then 500 ms.
Add point becomes Add... with a small menu: Click point, Hold, Key, Wait for image, Wait for pixel. Each opens a short dialog that uses the existing pickers (point picker, area capture, pixel sampler).
Edit... replaces Wait... and opens the dialog for the selected step.
Recording still produces click steps only. It never records keystrokes, as the README promises.
Validation reports the step: "Step 4 key: Enter a key such as F5".
Profiles, export and CLI
Export format version 2: images inside wait steps are embedded as base64 PNG (image_png), as image profiles already do. Version 1 files still import.
No new CLI flags. --sequence and --profile run whatever the sequence holds.
Questions to settle first
Default on_timeout: stop (safer) or skip?
Should wait_image be able to click the image it waited for (click: true), or should that stay a separate image-target run?
Keep the 50-step cap?
Once this is agreed, it ships in pieces with tests:
The schema and engine dispatch, with migration tests.
Settling the open questions so the work can start:
Default on_timeout is stop. A wait that never succeeds ends the run with a clear reason instead of carrying on blind.
wait_image may click the image it waited for (click: true), since "wait until Save appears, then click it" is the most common request. It stays off by default.
The 50-step cap stays.
First piece: the step type field and engine dispatch for click, hold and key steps, with migration tests. Wait steps and the step dialogs follow.
Piece 1 is in 03a423c: steps take an optional type (click, hold or key). Old sequences load unchanged as click steps, and the engine runs each step with its own action under the existing stop paths. Verified with make check (734 passed) and the new sequence-steps UI snapshot. Next: the wait_image and wait_pixel steps, then the Add and Edit dialogs.
Piece 2 is in 547cbc7: wait_image (with an optional click on the match) and wait_pixel steps, with timeout_ms and on_timeout (stop by default, or skip). The wait re-checks stops, limits, the failsafe corner and Pause when unfocused on every poll. Verified with make check (750 passed) and the sequence-steps snapshot. Remaining: the Add and Edit dialogs, export format v2 with wait-step images embedded, the README section and the CHANGELOG entry.
03a423c: step type field; click, hold and key steps in the engine
547cbc7: wait_image and wait_pixel steps with timeout_ms and on_timeout
9d50fda: Add... menu and per-type Edit entries in the window; README and CHANGELOG
7afde44: export format version 2 with wait-step images embedded
Verified with make check (767 passed), the sequence and sequence-steps UI snapshots, and the step menus listed in menus.txt / menus-steps.txt. The Add menu and the prompts are native popups and still need a manual look on a real desktop.
Two follow-ups are filed separately: a wait step that clicks the image doesn't add that window for Pause when unfocused, and replaced or removed step captures are never cleaned up.
Activity
TMHSDigital commentedon Oct 6, 2026
Design proposal
Step schema (backward compatible)
Each step gets an optional
type; a step without one is aclick, so every saved sequence, profile and export keeps loading unchanged.typeclick(default)x,y,button,click_type,delay_msholdx,y,button,hold_ms,delay_mskeykey,delay_mswait_imageimage_region,image_tolerance,timeout_ms,on_timeout,delay_msclick: true)wait_pixelx,y,color,tolerance,timeout_ms,on_timeout,delay_mson_timeoutisstop(end the run with a clear reason) orskip(go on to the next step).timeout_ms0 means wait until stopped.Engine
_perform_sequencedispatches ontype. Click, hold and key reuse_perform_click(spread and the failsafe corner check apply as today)._stop_event.wait. Before each poll they re-check stop requests, click and time limits, pause when unfocused and the failsafe, so every stop path in the ARCHITECTURE table still holds mid-wait. Image waits grab their own region on the click thread (about 17 ms each since Image watcher screenshots the whole virtual desktop 10 times a second #97), so no extra watcher thread per step is needed.stopends the run ascompleted, with the message "Step 4: the image didn't appear within 10 s".UI
3. key ctrl+s, then 500 ms.Profiles, export and CLI
image_png), as image profiles already do. Version 1 files still import.--sequenceand--profilerun whatever the sequence holds.Questions to settle first
on_timeout:stop(safer) orskip?wait_imagebe able to click the image it waited for (click: true), or should that stay a separate image-target run?Once this is agreed, it ships in pieces with tests:
TMHSDigital commentedon Nov 14, 2026
Settling the open questions so the work can start:
on_timeoutisstop. A wait that never succeeds ends the run with a clear reason instead of carrying on blind.wait_imagemay click the image it waited for (click: true), since "wait until Save appears, then click it" is the most common request. It stays off by default.First piece: the step
typefield and engine dispatch forclick,holdandkeysteps, with migration tests. Wait steps and the step dialogs follow.feat(sequence): click, hold and key step types (#119)
TMHSDigital commentedon Nov 14, 2026
Piece 1 is in 03a423c: steps take an optional
type(click,holdorkey). Old sequences load unchanged as click steps, and the engine runs each step with its own action under the existing stop paths. Verified with make check (734 passed) and the newsequence-stepsUI snapshot. Next: the wait_image and wait_pixel steps, then the Add and Edit dialogs.feat(sequence): wait-for-image and wait-for-pixel steps (#119)
TMHSDigital commentedon Nov 14, 2026
Piece 2 is in 547cbc7:
wait_image(with an optional click on the match) andwait_pixelsteps, withtimeout_msandon_timeout(stopby default, orskip). The wait re-checks stops, limits, the failsafe corner and Pause when unfocused on every poll. Verified with make check (750 passed) and thesequence-stepssnapshot. Remaining: the Add and Edit dialogs, export format v2 with wait-step images embedded, the README section and the CHANGELOG entry.feat(gui): add and edit hold, key and wait steps (#119)
TMHSDigital commentedon Nov 14, 2026
Done in four commits:
typefield; click, hold and key steps in the enginewait_imageandwait_pixelsteps withtimeout_msandon_timeoutVerified with make check (767 passed), the
sequenceandsequence-stepsUI snapshots, and the step menus listed inmenus.txt/menus-steps.txt. The Add menu and the prompts are native popups and still need a manual look on a real desktop.Two follow-ups are filed separately: a wait step that clicks the image doesn't add that window for Pause when unfocused, and replaced or removed step captures are never cleaned up.