Copyright (c) Hyperion Entertainment and contributors.

AmigaOS Manual: Python Interprocess communication through ARexx ports

From AmigaOS Documentation Wiki
Revision as of 05:50, 21 January 2019 by Janne Peräaho (talk | contribs) (Added an introduction and a list of supported commands)
Jump to navigation Jump to search

Workbench

Workbench is Amiga's default graphical user interface which opens up when Amiga is booted. Through Workbench you can launch applications and manage files and disks using the mouse. Workbench acts as an ARexx host under the name of WORKBENCH which will allow scripts to command Workbench just as users do.

In order to send commands to Workbench from a Python script, the arexx module must be imported first. The module contains the necessary functions to interface with an ARexx host. The module can be imported as follows:

# Include arexx module
import arexx

After importing the module, commands can be send to Workbench using the dorexx method:

rc1, rc2, result = arexx.dorexx( 'WORKBENCH', 'MENU WINDOW ROOT INVOKE WORKBENCH.ABOUT')

In the example above, Workbench's about requester will be opened by sending a command MENU WINDOW ROOT INVOKE WORKBENCH.ABOUT to Workbench.

Commands

Workbench responds to the commands listed below.

ACTIVATEWINDOW

CHANGEWINDOW

DELETE

FAULT

GETATTR

HELP

ICON

INFO

KEYBOARD

LOCKGUI

MENU

MOVEWINDOW

NEWDRAWER

RENAME

RX

SIZEWINDOW

UNLOCKGUI

UNZOOMWINDOW

VIEW

WINDOW

WINDOWTOBACK

WINDOWTOFRONT

ZOOMWINDOW