app_set_dialog_control
Read or change checkboxes, radio buttons, text fields, and list rows in an open dialog by label, with change verification and refusal of disabled or invalid actions.
Instructions
Read or CHANGE a control inside whatever dialog is open.
The other half of driving a dialog. Buttons are pressed by the dialog driver; this is for the checkboxes, radios and fields that decide what those buttons will DO.
FIND BY LABEL, not position. "Include Variants". Positions
move between versions and contexts, captions do not.
EVERY CHANGE IS VERIFIED. The new state is read back, and a click that silently did nothing is reported as a failure rather than as success. That matters here more than anywhere: a caller that believes an option was applied will go on to press something irreversible.
IT REFUSES RATHER THAN GUESSING when a control is DISABLED (Altium greys options that do not apply, and clicking one is at best a no-op), and when asked to switch a radio button OFF, which is not a thing a radio does.
SETTING IS NOT A TOGGLE. Asking for a state the control is
already in reports changed: false and clicks nothing, so
calling twice is safe.
Args: control_label: the control's visible label. checked: desired state for a checkbox. text: desired contents for an edit field. select_row: for a list, grid or tree, the row to select by name. Rows are matched by name for the same reason menu items are: positions shift and an index would pick the wrong one the first time the contents changed. dialog_title: substring to pick one dialog when several are open. Empty uses the first. list_only: change nothing, just report every control in the dialog with its role, state and whether it is enabled.
Returns:
For a read, the control list. For a change, ok,
changed and the state read back afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| checked | No | ||
| list_only | No | ||
| select_row | No | ||
| dialog_title | No | ||
| control_label | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||