读取并关闭阻塞 Keil 的模态对话框
dismiss_dialogReads Keil uVision modal dialog content and dismisses it by clicking the matching button, auto-selecting or falling back to WM_CLOSE. Unblocks stuck debug commands when a dialog is blocking.
Instructions
把 Keil「有个模态框在挡路」补成「框里写什么、点哪个按钮」:枚举 UV4 的模态对话框(类名 #32770),读出正文(Static 控件)与全部按钮文字(Button 控件)并按按钮点击关闭。button 传按钮文字(如「确定」「重试」,支持部分匹配);不传则按 确定/OK/是/关闭/重试 的语义顺序自动挑,没有可点按钮时退化为 WM_CLOSE。title 可按标题筛(多个框时),index 取第几个(默认 0)。返回 {ok, dismissed, clicked, method, dialog{title,message,buttons}, remaining}。用法:命令不返回且 keil_health 报 modal_blocked_suspected=true 时调它——先看 dialog.message 知道 Keil 报了什么,再决定点哪个按钮,解除阻塞后重试原命令。注意:① 关框只解除阻塞,不等于问题已修(如正文说输出文件写不进去,要先解决占用/权限);② 指定 button 却匹配不到时不会擅自改点别的按钮,而是返回 button_not_found 并列出可用按钮。 【参数】必填: 无;可选: button, title, index 【调用示例】{} 【风险】中——会改变目标状态或占用共享资源(调试态/串口/Keil 实例),必要时可回退。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | ||
| title | No | ||
| button | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |