osmates vm act
Act on a control of a Windows, macOS or Linux desktop machine by the ref osmates vm elements printed.
osmates vm act <machine> <ref> <action> [<value>] [--timeout <timeout>] [--json]invoke presses a button or a menu item, or else toggles, selects or expands it; set-value takes the value, or - to read it from standard input. It sends no keys or clicks, and prints whether the effect was verified.
Arguments
<machine>RequiredThe machine's identifier or name.
<ref>RequiredA ref, such as kqzxw41.
<action>RequiredWhat to do.
One of
invoke,toggle,expand,collapse,select,set-value,focus,scroll-into-view.<value>For set-value: the text or number, or - for standard input.
--timeout <timeout>Seconds the guest may take, 1 to 20.
Default:
5--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/vm/act.json
resultobjectRequiredresult.effectstringRequiredOne of
changed,unchanged,gone,unknown.result.elementobjectresult.isAnsweredbooleanRequiredresult.patternstringRequiredOne of
Invoke,Toggle,SelectionItem,ExpandCollapse,Value,RangeValue,SetFocus,ScrollItem.verificationobjectRequiredverification.evidencestringRequiredverification.statusstringRequiredOne of
verified,unverified,failed.
Fields nested deeper are in the schema.
Exit statuses
Its exit status is one of these.
| Status | Meaning |
|---|---|
| 0 | The command did what it was asked. |
| 1 | The command failed; with --json, standard error's last line is the error object. |
| 64 | The command line is wrong, as ArgumentParser found before the command ran. |
| 65 | What was given is wrong, found while the command ran; the same command fails until it changes. |
| 75 | The same command can work later with nothing changed, as while an update finishes. |
| 130 | Control-C cancelled what the command started. |