Shell Commands/Automator

From MorphOS Library

Revision as of 10:30, 24 June 2026 by JPV (talk | contribs) (Created page with "'''Automator''' - Controls MUI applications from scripts. It can both inspect and interact with the applications. ACTION/K/A,FORMAT/K,UID=TASKUID/K,OPEN=OPENWINDOWS/S,WINDOWI...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Shell Commands

Automator - Controls MUI applications from scripts. It can both inspect and interact with the applications.

ACTION/K/A,FORMAT/K,UID=TASKUID/K,OPEN=OPENWINDOWS/S,WINDOWID/K,WINDOWADDRESS/K, ID=OBJECTID/K,ADDRESS=OBJECTADDRESS/K,CONTENTS/K,LISTACTIVE/K/N,CYCLEACTIVE/K/N,MUIKEY/K

Automator can list running MUI applications, locate objects in MUI windows, control windows (activate, close, bring to front), click on buttons, change selections, and enter text on inputs.

A more detailed documentation can be found on the SYS:Docs/Automator.readme file.

ACTION must be one of the following options:

LIST           - Lists all running MUI applications
WINDOWS        - Lists all windows of the application
CLOSEWINDOW    - Closes a window
TOFRONT        - Brings a window to front
ACTIVATE       - Activates a window
OBJECTS        - Lists supported objects in a window
CLICK          - Clicks a button
SETCONTENTS    - Sets contents of a string object
ACKCONTENTS    - Sets contents of a string with an Enter press
CHECK          - Sets a checkmark object to the selected state
UNCHECK        - Sets a checkmark object to the unselected state
SETLISTACTIVE  - Sets the active list entry
SETCYCLEACTIVE - Sets the active cycle gadget item
SENDMUIKEY     - Sends a MUIKEY to an object

Examples:

Ram Disk:> Automator ACTION=LIST
100110  AMBIENT
100137  EXPOSE
100420  WAYFARER
100462  MCON.1
Ram Disk:> Automator ACTION=WINDOWS UID=100462
0       "Ambient Shell"
Ram Disk:> Automator ACTION=TOFRONT UID=100462 WINDOWID=0
Ram Disk:> Automator ACTION=OBJECTS UID=100462 WINDOWID=0
BUTTON  271b0478        0       "Page 1"
BUTTON  28ad5d50        0       "Page 2"
BUTTON  330ed840        0       "Add page"
BUTTON  330ed9e0        0       "New window"
BUTTON  330edb80        0       "Detach..."
BUTTON  330edd20        0       "Close page"
Ram Disk:> Automator ACTION=CLICK UID=100462 WINDOWID=0 ADDRESS=330ed840