iphone_batch
Runs up to 20 sequential iPhone actions in one call, stopping at the first failed step and reporting its number, so defined multi-step interactions complete without separate calls.
Instructions
按顺序执行几步操作,一次调用完成(最多 20 步),某一步出错就停下并说明是第几步。
steps 每项是 {"tool": 工具名, 其余是该工具的参数},可用:iphone_tap、iphone_tap_element、iphone_long_press、iphone_swipe、iphone_type_text、iphone_press_button、iphone_launch_app、iphone_terminate_app、iphone_open_url、iphone_wait_for,以及 {"tool": "wait", "seconds": 秒数}(不超过 5)。 适合确定的连续操作;每步的结果不确定(例如点了以后不知道会跳到哪)时,还是一步步来。 then 同其他操作工具:全部做完后顺带返回界面。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| then | No | 操作后等界面稳定,再顺带返回界面:elements=元素列表(最多 80 个),screenshot=截图。省一次单独的调用 | none |
| steps | Yes | 要执行的步骤 | |
| then_filter | No | then=elements 时只列包含这段文字的元素 | |
| then_region | No | then=screenshot 时只返回这块区域的放大图 [x, y, width, height](点),例如游戏棋盘 | |
| then_settle | No | 顺带返回界面前最多等几秒让界面稳定(不超过 10)。游戏、地图按画面是否静止判断,消除连锁等长动画可调大,画面一静止就返回 | |
| reuse_elements | No | 这批操作不改变界面布局时(例如在同一个键盘上连按)设为 true:按名字点击复用最近读到的元素树,每步省 0.3~0.8 秒。会跳转页面的不要用,否则可能点到旧位置 |