Desktop object action
Find a captured control in a Windows application and act on it: click, set or read text, read properties, select, expand, toggle, check, list items, read a grid, wait for it or get its position.
Command in the Desktop objects toolkit · id ooa.desktop_ui/object_action · 23 inputs (1 required), 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Captured object | Dictionary | Yes | The captured object (from Pick object or OneAgentStudio's desktop capture): window, properties with match and use, path and index. | |
| Action | String | No | click | What to do with the object. |
| Click type | String | No | left | click: which click to make. |
| Click method | String | No | auto | click: pattern presses the control through UI Automation without moving the mouse (left click only); mouse moves the pointer and clicks; auto uses a pattern when the control offers one, else the mouse. |
| Offset x | Number | No | 0 | click with the mouse: pixels right of the object's centre (negative for left). |
| Offset y | Number | No | 0 | click with the mouse: pixels below the object's centre (negative for above). |
| Text | Any | No | set_text: the text to enter (a Credential is accepted and never logged). | |
| Clear first | Boolean | No | true | set_text: remove the existing text first; false appends. |
| Text method | String | No | auto | set_text: set_value writes the value directly through UI Automation; type sends key presses one character at a time; auto writes directly when the control allows it, else types. |
| Pause between keys (milliseconds) | Number | No | 0 | set_text with typing: pause between characters in milliseconds. |
| Property | String | No | get_property: the property to read, e.g. Name, Value, IsEnabled, ToggleState, IsSelected, ExpandCollapseState. | |
| Item | String | No | select_item: the text of the item to select in a list, combo box, tree or tab control. | |
| Item index | Number | No | select_item: the position of the item to select (0 is the first), used when item is empty. | |
| Timeout (seconds) | Number | No | 10 | How long to wait for the object to appear, in seconds. For wait_disappear, how long to wait for it to go. |
| If not found | String | No | error | When the object is not there in time: error stops with an error; continue skips this step (result is empty, found is false) and carries on. |
| Run in background | Boolean | No | false | Work through UI Automation only: the window is not brought to the front and the mouse and keyboard are not used, so the application can stay behind other windows or minimised. Clicks and text then need a control that supports it (a single left click; text set directly). |
| Row | Number | No | Grid cell actions: the row, 1 for the first (G4). | |
| Column | Number | No | Grid cell actions: the column, 1 for the first (G4). | |
| Find text | String | No | The text of the cell to find (an exact match first, else the first containing it) (G4). | |
| Scroll direction | String | No | down | scroll: which way (G4). |
| Scroll amount | String | No | line | scroll: a line or a page at a time (G4). |
| Scroll times | Number | No | 1 | scroll: how many times (G4). |
| Index from one | Boolean | No | false | item_index counts from 1 for the first item, as Get selected index does; off counts from 0 as older steps did (G4). |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Any | What the action returns: text for get_text, a value for get_property, a dictionary for get_all_properties and get_coordinates, a list for get_children and get_list_items, a table for get_table, true/false for the wait actions. |
| healed_by | String | Empty when the object was found by its used properties; otherwise the recorded property that found it (update the object). |
| found | Boolean | False when the step was skipped because the object was not found (if_not_found = continue). |