qt_trigger_action
Triggers a menu or toolbar action in a running Qt application by display text or zero-based index, enabling automated UI control when you know the action label or order.
Instructions
Trigger a menu action or toolbar action by text or index.
Args: ref: Ref to a QMenu, QMenuBar, QToolBar, or any widget with actions. action_text: The action's display text (e.g., 'Save', '&Open'). Ampersands are stripped for matching. action_index: The 0-based index of the action (matching qt_menu_items order).
Provide either action_text or action_index (not both). Use qt_menu_items first to see available actions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| instance | No | ||
| action_text | No | ||
| action_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |