You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Read text/value content (works for RichEditBox, TextBox, Slider, labels)
106
106
winapp ui get-value doc-texteditor-53ad -a notepad
107
107
winapp ui get-value SearchBox -a myapp
108
+
winapp ui get-value CmbTheme -a myapp # reads ComboBox selected item via SelectionPattern
108
109
109
110
# Check toggle/selection state, value, scroll position
110
111
winapp ui get-property chk-agreecheckbox-b2c3 -a myapp --property ToggleState
@@ -262,7 +263,7 @@ Read UIA property values from an element. Specify --property for a single proper
262
263
263
264
### `winapp ui get-value`
264
265
265
-
Read the current value from an element. Tries TextPattern (RichEditBox, Document), ValuePattern (TextBox, ComboBox, Slider), then Name (labels). Usage: winapp ui get-value <selector> -a <app>
266
+
Read the current value from an element. Uses smart fallback: TextPattern (RichEditBox, Document), ValuePattern (TextBox, Slider), SelectionPattern (ComboBox, RadioButton, TabView), then Name (labels). Usage: winapp ui get-value <selector> -a <app>
Copy file name to clipboardExpand all lines: docs/ui-automation.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,8 @@ winapp ui search "Save" -a notepad # find elements containing "Save"
128
128
winapp ui search "error" -a myapp # case-insensitive match
129
129
```
130
130
131
+
When a text search matches multiple elements (e.g., SettingsExpander where Group, Button, and Text all share the same name), the CLI automatically picks the only invokable element. If multiple are invokable, it lists all matches with slugs.
132
+
131
133
For non-invokable search results (e.g., a TextBlock inside a Button), the search
132
134
automatically surfaces the nearest **invokable ancestor** — the parent element you can use with `invoke`.
Read the current value from an element. Tries TextPattern (RichEditBox, Document), ValuePattern (TextBox, Slider), then Name (labels).
273
+
Read the current value from an element. Uses a smart fallback chain: TextPattern (RichEditBox, Document) → ValuePattern (TextBox, Slider) → SelectionPattern (ComboBox, RadioButton, TabView) → Name (labels).
272
274
```bash
273
275
winapp ui get-value doc-texteditor-53ad -a notepad # read full document text
274
276
winapp ui get-value SearchBox -a myapp # read TextBox content
0 commit comments