Copyright (c) Hyperion Entertainment and contributors.

Difference between revisions of "AmigaOS Manual: Python Interprocess communication through ARexx ports"

From AmigaOS Documentation Wiki
Jump to navigation Jump to search
(Created page with "= Workbench =")
 
(Added an introduction and a list of supported commands)
Line 1: Line 1:
 
= Workbench =
 
= 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 [[AmigaOS_Manual:_Python_Modules_and_Packages#arexx|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:
  +
  +
<syntaxhighlight lang="python">
  +
# Include arexx module
  +
import arexx
  +
</syntaxhighlight>
  +
  +
After importing the module, commands can be send to Workbench using the [[AmigaOS_Manual:_Python_Modules_and_Packages#dorexx.28.29|dorexx]] method:
  +
<syntaxhighlight lang="python">
  +
rc1, rc2, result = arexx.dorexx( 'WORKBENCH', 'MENU WINDOW ROOT INVOKE WORKBENCH.ABOUT')
  +
</syntaxhighlight>
  +
  +
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 ===

Revision as of 05:50, 21 January 2019

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