app_run_ui_command
Invoke an EasyEDA menu command and answer the modal dialogs it opens in one call, enabling scripted UI actions without a separate watcher process.
Instructions
Invoke a menu command AND answer the dialogs it raises.
The composite, and usually the one to reach for. Firing a menu command that opens a modal blocks Altium's scripting engine, so the two halves cannot be separate bridge calls: the second would never be answered. Both halves here are Win32, so they run in one call and the modal is no obstacle.
Doing this by hand meant arming a watcher process before firing the command, which is not something a caller should have to assemble.
THE GATES ARE THE DIALOG DRIVER'S. allow_confirm defaults ON
because a command invoked deliberately usually needs its "yes,
go ahead" answered, while allow_commit defaults OFF, so a
change order is presented rather than executed. dry_run
defaults OFF here, unlike app_drive_dialogs: naming a
command to run and having nothing happen is not what the caller
asked for.
Args: menu_path: pipe-separated, for example "Tools|Annotation|Force Annotate All Schematics...". Discover paths with app_click_menu(list_only=True). allow_commit: permit a design-changing press. allow_confirm: permit answering confirmations. dry_run: invoke the command but press nothing. may_steal_focus: opening a menu needs real input. wait_first: seconds to wait for the first dialog. budget: seconds before giving up. expect_dialog: part of the title of the dialog the command should open. When a different dialog (or none) appears, the reply fails at the menu stage and nothing is driven.
Returns:
ok, the menu result, and the full dialogs record.
ok is true only when the menu click AND the drive both
succeeded, so a command that opened something nobody could
answer does not read as a success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget | No | ||
| dry_run | No | ||
| menu_path | Yes | ||
| wait_first | No | ||
| allow_commit | No | ||
| allow_confirm | No | ||
| expect_dialog | No | ||
| may_steal_focus | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||