Add interrupt rule
Add (or replace by name) a rule for this run: when a window or element appears, or a condition becomes true, click, press keys, close the window or run a child agent.
Command in the Interrupt handlers toolkit · id ooa.interrupts/add_rule · 9 inputs (2 required), no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Name | String | Yes | Rule name; adding a rule with the same name replaces it. | |
| When window | String | No | Window title pattern: text the title contains, a wildcard pattern with * and ?, or re: followed by a regular expression. | |
| When element | String | No | Element selector that marks the pop-up, looked for in the browser session below. | |
| Browser session | String | No | browser | Browser session for element rules. |
| Then | String | Yes | Response: click the target, press the target keys, close the matched window, run the target agent, or only log it. | |
| Target | String | No | For click: a selector in the browser session or x,y screen coordinates; for press_keys: keys such as ENTER or ALT+F4; for run_agent: the agent id. | |
| Inputs | Dictionary | No | Inputs for the child agent (run_agent). | |
| Maximum times | Number | No | 0 | Respond at most this many times in the run; 0 means no limit. |
| When condition | Any | No | Any condition, as for If (a toolkit's condition such as Image found), that marks the interruption; variables in it are read when the rule is added (Watch for interruptions reads them each time). |