Set a control's text (experimental)
nvda_set_valueSet an edit field’s text via its accessibility API, even in a background window without focus, then report the current value so you can verify the change.
Instructions
Experimental: give an edit field new text through its accessibility API (UI Automation ValuePattern or IAccessible accValue) instead of the keyboard, then report the value it has now.
It needs no focus, so it can reach a field in a background window, found with nvda_find_objects and window. Many web editors (React, Lexical, as in WhatsApp Web) ignore text set this way or lose it on the next key press, so check the reported value; if it did not take, use nvda_focus_object and nvda_type_text. This counts as controlling the computer, like nvda_type_text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | A control from nvda_find_objects. The focused control when left out. | |
| text | Yes | The control's new text, replacing what is there. An empty string clears it. | |
| record | No | Also record what this action changed: how the accessibility tree around it changed (controls added, removed, renamed or moved, values and states) and the events NVDA handled. NVDA is silent for up to a few seconds while the tree is read. For something the user does, use nvda_trace_events with tree. | |
| settle_ms | No | Stop listening once NVDA has been quiet this long. | |
| timeout_ms | No | Stop listening, or waiting for until_speech, after this long in total. | |
| until_speech | No | Keep listening until NVDA says something containing this text (ignoring case), such as 'sent' or a dialog title, instead of stopping at the first pause. The result says whether it was heard. | |
| record_within | No | Record only inside this control, an id from nvda_find_objects, such as a chat's message list. Implies record. By default the web document or window around the action is recorded. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |