Workbench acts as an ARexx host under the name of WORKBENCH. It supports a number of commands as will be described below. Note that for the ARexx interface to work, rexxsyslib.library must be installed (this library is part of a regular Workbench installation) and the RexxMast program must have been started.
ACTIVATEWINDOW [WINDOW] <ROOT|Drawer name>ACTIVATEWINDOW WINDOWWINDOWROOT to activate the Workbench root window (where volume icons and AppIcons live) or the fully qualified name of a drawer window to activate. Note that the drawer window must already be open.WINDOW parameter is specified, this command will try to operate on the currently active Workbench window.WORKBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device./* Activate the root window. */ ADDRESS workbench ACTIVATEWINDOW root /* Activate the "Work:" partition's window. */ ACTIVATEWINDOW 'Work:'
CHANGEWINDOW [WINDOW] <ROOT|ACTIVE|Drawer name> [[LEFTEDGE] <new left edge position>][[TOPEDGE] <new top edge position>][[WIDTH] <new window width>][[HEIGHT] <new window height>]CHANGEWINDOW WINDOW,LEFTEDGE/N,TOPEDGE/N,WIDTH/N,HEIGHT/NWINDOWROOT to resize/move the Workbench root window (where volume icons and AppIcons live), ACTIVE to change the currently active Workbench window or the fully qualified name of a drawer window to change. Note that the drawer window must already be open.LEFTEDGETOPEDGEWIDTHHEIGHTACTIVE as the window name and none of the Workbench windows is currently active. The error code will be placed in the WORBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device./* Change the root window; move it to position 10,30 and change its size to 200x100 pixels. */ ADDRESS workbench CHANGEWINDOW root LEFTEDGE 10 TOPEDGE 30 WIDTH 200 HEIGHT 100 /* Change the currently active window. */ CHANGEWINDOW active 20 40 200 100
DELETE [NAME] <File or drawer name> [ALL]DELETE NAME/A,ALL/SNAMEALLRAM:Empty. A relative path, such as /fred/barney will not work./* Delete the contents of the drawer RAM:Empty". */ ADDRESS workbench DELETE 'RAM:Empty' ALL
FAULT [CODE] <Error code>FAULT CODE/A/NCODE/* Query the error message corresponding to error code #205. */ ADDRESS workbench OPTIONS RESULTS FAULT 205 SAY result
GETATTR [OBJECT] <Object name> [NAME <Item name>][STEM <Name of stem variable>] [VAR <Variable name>]GETATTR OBJECT/A,NAME/K,STEM/K,VAR/KOBJECTNAMESTEMVARRESULT variable), this is where you provide its name.APPLICATION.VERSIONAPPLICATION.SCREENAPPLICATION.AREXXAPPLICATION.LASTERRORAPPLICATION.ICONBORDER6 26 12 6. The four numbers represent the left border width, the top border height, the right border width and the bottom border height (in exactly that order).APPLICATION.FONT.SCREEN.NAMEAPPLICATION.FONT.SCREEN.WIDTH APPLICATION.FONT.SCREEN.HEIGHT.SIZE attribute.APPLICATION.FONT.SCREEN.SIZEGETATTR command.APPLICATION.FONT.ICON.NAMEAPPLICATION.FONT.ICON.WIDTH APPLICATION.FONT.ICON.HEIGHTAPPLICATION.FONT.ICON.SIZEGETATTR command.APPLICATION.FONT.SYSTEM.NAMEAPPLICATION.FONT.SYSTEM.WIDTHAPPLICATION.FONT.SYSTEM.HEIGHTAPPLICATION.FONT.SYSTEM.SIZENAME parameter of the GETATTR command.WINDOWS.COUNTWINDOWS.0 .. WINDOWS.NWINDOWS.ACTIVEKEYCOMMANDS.COUNTKEYCOMMANDS.0 .. KEYCOMMANDS.NKEYCOMMANDS.<n>.NAMEKEYCOMMANDS.<n>.KEYKEYCOMMANDS.<n>.COMMANDMENUCOMMANDS.COUNTMENU ADD .. command). This can be 0.MENUCOMMANDS.0 .. MENUCOMMANDS.NMENUCOMMANDS.<n>.NAMEMENUCOMMANDS.<n>.TITLEMENUCOMMANDS.<n>.SHORTCUTMENUCOMMANDS.<n>.COMMANDWINDOW.LEFTWINDOW.TOPWINDOW.WIDTHWINDOW.HEIGHTWINDOW.MIN.WIDTHWINDOW.MIN.HEIGHTWINDOW.MAX.WIDTHWINDOW.MAX.HEIGHTWINDOW.VIEW.LEFTWINDOW.VIEW.TOPWINDOW.SCREEN.NAMEWINDOW.SCREEN.WIDTH WINDOW.SCREEN.HEIGHTWINDOW.ICONS.ALL.COUNTWINDOW.ICONS.ALL.0 .. WINDOW.ICONS.ALL.NWINDOW.ICONS.ALL.<n>.NAMEWINDOW.ICONS.ALL.<n>.LEFT WINDOW.ICONS.ALL.<n>.TOPWINDOW.ICONS.ALL.<n>.WIDTH WINDOW.ICONS.ALL.<n>.HEIGHTWINDOW.ICONS.ALL.<n>.TYPEDISK, DRAWER, TOOL, PROJECT, GARBAGE, DEVICE, KICK or APPICON.WINDOW.ICONS.ALL.<n>.STATUSSELECTED OPEN which means that the icon is selected and the corresponding drawer is currently open. The other options include UNSELECTED and CLOSED.WINDOW.ICONS.SELECTED.COUNTWINDOW.ICONS.SELECTED.0 .. WINDOW.ICONS.SELECTED.NWINDOW.ICONS.SELECTED.<n>.NAMEWINDOW.ICONS.SELECTED.<n>.LEFT WINDOW.ICONS.SELECTED.<n>.TOPWINDOW.ICONS.SELECTED.<n>.WIDTH WINDOW.ICONS.SELECTED.<n>.HEIGHTWINDOW.ICONS.SELECTED.<n>.TYPEWINDOW.ICONS.SELECTED.<n>.STATUSSELECTED OPEN which means that the icon is selected and the corresponding drawer is currently open. The other options include UNSELECTED and CLOSED. Of course, for the WINDOW.ICONS.SELECTED stem the icon status will always be reported as SELECTED.WINDOW.ICONS.UNSELECTED.COUNTWINDOW.ICONS.UNSELECTED.0 .. WINDOW.ICONS.UNSELECTED.NWINDOW.ICONS.UNSELECTED.<n>.NAMEWINDOW.ICONS.UNSELECTED.<n>.LEFT WINDOW.ICONS.UNSELECTED.<n>.TOPWINDOW.ICONS.UNSELECTED.<n>.WIDTH WINDOW.ICONS.UNSELECTED.<n>.HEIGHTWINDOW.ICONS.UNSELECTED.<n>.TYPEDISK, DRAWER, TOOL, PROJECT, GARBAGE, DEVICE, KICK or APPICON.WINDOW.ICONS.UNSELECTED.<n>.STATUSUNSELECTED OPEN which means that the icon is selected and the corresponding drawer is currently open. The other options include SELECTED and CLOSED. Of course, for the WINDOW.ICONS.UNSELECTED stem the icon status will always be reported as UNSELECTED.WORKBENCH.LASTERROR variable.RESULT - The information retrieved from the database./* Query the Workbench version. */ ADDRESS workbench OPTIONS RESULTS GETATTR application.version SAY result /* Query the Workbench version and store it in the * variable 'version_number'. */ GETATTR application.version VAR version_number SAY version_number /* Query the names of all currently open windows, * then print them. */ GETATTR windows STEM window_list DO i = 0 TO window_list.count-1 SAY window_list.i; END; /* Query name, position and size of the first icon * shown in the root window. */ GETATTR window.icons.all.0 NAME root STEM root SAY root.name SAY root.left SAY root.top SAY root.width SAY root.height SAY root.type /* Query the width and height of the root window. */ GETATTR window.width NAME root SAY result GETATTR window.height NAME root SAY result /* Query the length of a text (in pixels) with reference * to the icon font. */ GETATTR application.font.icon.size NAME 'Text to measure' SAY result
HELP [COMMAND <Command name>] [MENUS] [PROMPT]HELP COMMAND/K,MENUS/S,PROMPT/SCOMMANDMENUSPROMPTRESULT/* Retrieve the list of supported commands. */ ADDRESS workbench OPTIONS results HELP SAY result /* Retrieve the command template of the 'GETATTR' command. */ HELP COMMAND getattr SAY result /* Retrieve the list of available menu items. */ HELP MENUS SAY result
ICON [WINDOW] <Window name> <Icon name> .. <Icon name> [OPEN] [MAKEVISIBLE] [SELECT] [UNSELECT] [UP <Pixels>] [DOWN <Pixels>] [LEFT <Pixels>] [RIGHT <Pixels>] [X <Horizontal position>] [Y <Vertical position>] [ACTIVATE UP|DOWN|LEFT|RIGHT] [CYCLE PREVIOUS|NEXT] [MOVE IN|OUT]ICON WINDOW,NAMES/M,OPEN/S,MAKEVISIBLE/S,SELECT/S,UNSELECT/S, UP/N,DOWN/N,LEFT/N,RIGHT/N,X/N,Y/N,ACTIVATE/K,CYCLE/K, MOVE/KWINDOWROOT to work on the Workbench root window (where volume icons and AppIcons live), ACTIVE to work on the currently active Workbench window or the fully qualified name of a drawer window. Note that the drawer window must already be open.WINDOW parameter is specified, this command will try to operate on the currently active Workbench window.NAMESOPENMAKEVISIBLESELECTUNSELECTUP, DOWN, LEFT, RIGHTX, YACTIVATEUP searches upwards, DOWN searches downwards, LEFT searches to the left and RIGHT searches to the right.CYCLEACTIVATE description above). You must indicate in which direction you want to cycle through the icons: you can either specify PREVIOUS or NEXT.MOVEIN parameter will cause the drawer represented by the active icon to be opened. Please note that an icon must be selected and it must be a drawer. The OUT parameter will open the drawer's parent directory, and it also requires that in the drawer there is an icon selected. This may sound strange, but this feature is not meant as a replacement for the Open Parent menu item.WORKBENCH.LASTERROR variable./* Select the icons of the "Workbench" and "Work" volumes displayed in the root window. */ ADDRESS workbench ICON WINDOW root NAMES Workbench Work SELECT /* Open the "Workbench" volume icon displayed in the root window. */ ICON WINDOW root NAMES Workbench OPEN
INFO [NAME] <File, drawer or volume name>INFO NAME/ANAME/* Open the information window for SYS:". */ ADDRESS workbench INFO NAME 'SYS:'
KEYBOARD [NAME] <Name of key combination> ADD|REMOVE [KEY <Key combination>] [CMD <ARexx command>]KEYBOARD NAME/A,ADD/S,REMOVE/S,KEY,CMD/FNAMEADDREMOVEKEYCMDWORKBENCH.LASTERROR variable./* Bind an ARexx script to the [Control]+A key combination. * When pressed, this will cause the ARexx script by the name * "test.wb" to be executed. ARexx will search for that program * in the "REXX:" directory. If no "test.wb" file can be found, ARexx will attempt to execute a script * by the name of "test.rexx". */ ADDRESS workbench KEYBOARD ADD NAME test1 KEY ,"ctrl a", CMD ,'test' /* Bind an ARexx script to the [Alt]+[F1] key combination. * When pressed, this will cause a short inline program to be * executed. */ KEYBOARD ADD NAME test2 KEY ,"alt f1", CMD "say 42" /* Bind an ARexx script to the [Shift]+[Help] key combination. * When pressed, this will cause the "Workbench About" menu item to be invoked. */ KEYBOARD ADD NAME test3 KEY ,"shift help", CMD "MENU INVOKE WORKBENCH.ABOUT" /* Remove the first key combination we added above. */ KEYBOARD REMOVE NAME test1
LOCKGUILOCKGUIUNLOCKGUI commands as there were LOCKGUI commands to make the Workbench drawer windows usable again. In other words, the LOCKGUI command "nests"./* Block access to all Workbench drawer windows. */ ADDRESS workbench LOCKGUI
MENU [WINDOW <Window name>] [INVOKE] <Menu name> [NAME <Menu name>] [TITLE <Menu title>] [SHORTCUT <Menu shortcut>] [ADD|REMOVE] [CMD <ARexx command>]MENU WINDOW/K,INVOKE,NAME/K,TITLE/K,SHORTCUT/K,ADD/S,REMOVE/S,CMD/K/FWINDOWROOT to work on the Workbench root window (where volume icons and AppIcons live), ACTIVE to work on the currently active Workbench window or the fully qualified name of a drawer window. Note that the drawer window must already be open.WINDOW parameter is specified, this command will try to operate on the currently active Workbench window.INVOKENAMETools menu.TITLETools menu. This parameter is required if you ADD a new menu item.SHORTCUTADDMENU command to add a new item to the Tools menu. When adding a menu item you will also need to specify the NAME, TITLE and CMD parameters.REMOVEMENU command to remove a menu item previously added via the ARexx interface. When removing a menu item you will also need to specify the NAME parameter.CMDWORKBENCH.BACKDROPBackdrop window switch.WORKBENCH.EXECUTEExecute Command requester. The user will be prompted to enter the command to be executed.WORKBENCH.REDRAWALLRedraw All function.WORKBENCH.UPDATEALLUpdate All function.WORKBENCH.LASTMESSAGEWORKBENCH.ABOUTWorkbench About... requester.WORKBENCH.QUITWINDOW.NEWDRAWERWINDOW.OPENPARENTWINDOW.CLOSEWINDOW.UPDATEWINDOW.SELECTCONTENTSWINDOW.CLEARSELECTIONWINDOW.CLEANUPBY.COLUMNWINDOW.CLEANUPBY.NAMEWINDOW.CLEANUPBY.DATEWINDOW.CLEANUPBY.SIZEWINDOW.CLEANUPBY.TYPEWINDOW.RESIZETOFITWINDOW.SNAPSHOT.WINDOWWINDOW.SNAPSHOT.ALLWINDOW.SHOW.ONLYICONSWINDOW.SHOW.ALLFILESWINDOW.VIEWBY.ICONWINDOW.VIEWBY.NAMEWINDOW.VIEWBY.DATEWINDOW.VIEWBY.SIZEWINDOW.VIEWBY.TYPEICONS.OPENICONS.COPYICONS.RENAMEICONS.INFORMATIONICONS.SNAPSHOTICONS.UNSNAPSHOTICONS.LEAVEOUTICONS.PUTAWAYICONS.DELETEICONS.FORMATDISKFormat command on every currently selected disk icon. This will not format the disks immediately. The user will have to confirm this action first.ICONS.EMPTYTRASHTOOLS.RESETWBHELP command will provide a complete list of menu items that can be invoked. Depending on the state of each menu item (e.g. the Open menu item will be disabled if no icon is currently selected) the MENU command can silently fail to invoke the item you had in mind.WORKBENCH.LASTERROR variable./* Invoke the "About" menu. */ ADDRESS workbench MENU WINDOW root INVOKE WORKBENCH.ABOUT /* Add an item to the "Tools" menu; selecting it * will cause the ARexx script by the name "test.wb" * to be executed. ARexx will search for that program * in the "REXX:" directory. If no "test.wb" file can * be found, ARexx will attempt to execute a script * by the name of "test.rexx". */ MENU ADD NAME test1 TITLE ,"Execute a script", SHORTCUT ,'!' CMD ,'test' /* Add an item to the "Tools" menu; selecting it * will cause a short inline program to be executed. */ MENU ADD NAME test2 TITLE ,"Short inline program", CMD "say 42" /* Add an item to the "Tools" menu; selecting it * will cause the Workbench "About" menu item to be invoked. */ MENU ADD NAME test3 TITLE ,"About...", CMD "MENU INVOKE WORKBENCH.ABOUT" /* Remove the first menu item we added above. */ MENU REMOVE NAME test1
MOVEWINDOW [WINDOW] <ROOT|ACTIVE|Drawer name> [[LEFTEDGE] <new left edge position>] [[TOPEDGE] <new top edge position>]MOVEWINDOW WINDOW,LEFTEDGE/N,TOPEDGE/NWINDOWROOT to move the Workbench root window (where volume icons and AppIcons live), ACTIVE to move the currently active Workbench window or the fully qualified name of a drawer window to change. Note that the drawer window must already be open.WINDOW parameter is specified, this command will try to operate on the currently active Workbench window.LEFTEDGETOPEDGEACTIVE as the window name and none of the Workbench windows is currently active. The error code will be placed in the WORKBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device./* Move the root window to position 10,30. */ ADDRESS workbench MOVEWINDOW root LEFTEDGE 10 TOPEDGE 30 /* Move the currently active window. */ MOVEWINDOW active 20 40
NEWDRAWER [NAME] <Name of drawer to create>NEWDRAWER NAME/ANAMERAM:Empty. A relative path, such as /fred/barney will not work./* Create a drawer by the name of "Empty" in the RAM disk. */ ADDRESS workbench NEWDRAWER 'RAM:Empty'
RENAME [OLDNAME] <Name of file/drawer/volume to rename> [NEWNAME] <New name of the file/drawer/volume>RENAME OLDNAME/A,NEWNAME/AOLDNAMERAM:Empty. A relative path, such as /fred/barney, will not work.NEWNAMEwilma is valid new name, /wilma or wilma: would be invalid names.Rename command. For example, RENAME 'ram:empty' ,'newname'
will rename the file RAM:empty to RAM:newname.
/* Rename a drawer by the name of "Old" in the RAM disk to "New". */ ADDRESS workbench RENAME 'RAM:Old' 'New'
RX [CONSOLE] [ASYNC] [CMD] <Command to execute>RX CONSOLE/S,ASYNC/S,CMD/A/FCONSOLEASYNCRX command will return as soon as ARexx has been instructed to run the command you specified. Otherwise, the RX command will wait for the specified ARexx command to complete execution.COMMAND/* Execute an ARexx program by the name of 'test.wb'; * its output should be sent to a console window. */ ADDRESS workbench RX CONSOLE CMD 'test.wb'
SIZEWINDOW [WINDOW] <ROOT|ACTIVE|Drawer name> [[WIDTH] <new window width>] [[HEIGHT] <new window height>]SIZEWINDOW WINDOW,WIDTH/N,HEIGHT/NWINDOWROOT to resize the Workbench root window (where volume icons and AppIcons live), ACTIVE to resize the currently active Workbench window or the fully qualified name of a drawer window to change. Note that the drawer window must already be open.WIDTHHEIGHTACTIVE as the window name and none of the Workbench windows is currently active. The error code will be placed in the WORKBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device./* Change the root window size to 200x100 pixels. */ ADDRESS workbench SIZEWINDOW root 30 WIDTH 200 HEIGHT 100 /* Resize the currently active window. */ SIZEWINDOW active 200 100
UNLOCKGUIUNLOCKGUIUNLOCKGUI commands as there were LOCKGUI commands to make the Workbench drawer windows usable again. In other words, the LOCKGUI command "nests"./* Reallow access to all Workbench drawer windows. */ ADDRESS workbench UNLOCKGUI
UNZOOMWINDOW [WINDOW] <ROOT|ACTIVE|Drawer name>UNZOOMWINDOW WINDOWWINDOWROOT will use the Workbench root window (where volume icons and AppIcons live), ACTIVE will use the currently active Workbench window. Any other fully qualified path name will use the drawer window corresponding to the path.WINDOW parameter is specified, this command will try to operate on the currently active Workbench window.WORKBENCH.LASTERROR variable./* Change the root window. */ ADDRESS workbench UNZOOMWINDOW root
VIEW [WINDOW] <ROOT|ACTIVE|Drawer name> [PAGE|PIXEL] [UP|DOWN|LEFT|RIGHT]VIEW WINDOW,PAGE/S,PIXEL/S,UP/S,DOWN/S,LEFT/S,RIGHT/SWINDOWROOT to change the Workbench root window view (where volume icons and AppIcons live), ACTIVE to change the currently active Workbench window view or the fully qualified name of a drawer window to change. Note that the drawer window must already be open.UPPAGE is specified, moves the view up by a whole page. If PIXEL is specified, moves the view up by a single pixel.DOWNPAGE is specified, moves the view down by a whole page. If PIXEL is specified, moves the view down by a single pixel.LEFTPAGE is specified, moves the view left by a whole page. If PIXEL is specified, moves the view left by a single pixel.RIGHTPAGE is specified, moves the view right by a whole page. If PIXEL is specified, moves the view right by a single pixel.ACTIVE as the window name and none of the Workbench windows is currently active. The error code will be placed in the WORKBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device.GETATTR command and query the window's WINDOW.VIEW.LEFT and WINDOW.VIEW.TOP attributes./* Change the root window view; move it up by a whole page. */ ADDRESS workbench VIEW root PAGE UP
WINDOW [WINDOWS] <Window name> .. <Window name> [OPEN|CLOSE] [SNAPSHOT] [ACTIVATE] [MIN|MAX] [FRONT|BACK] [CYCLE PREVIOUS|NEXT]WINDOW WINDOWS/M/A,OPEN/S,CLOSE/S,SNAPSHOT/S,ACTIVATE/S,MIN/S,MAX/S, FRONT/S,BACK/S,CYCLE/KWINDOWSROOT for the Workbench root window (where volume icons and AppIcons live), ACTIVE for the currently active Workbench window or the fully qualified name of a drawer window.OPENCLOSESNAPSHOT, ACTIVATE, etc.) can be performed on it.SNAPSHOTACTIVATEMINMAXFRONTBACKCYCLEPREVIOUS, to activate the previous drawer window in the list, or NEXT, to activate the next following drawer window in the list.ACTIVE as a window name and none of the Workbench windows is currently active. The error code will be placed in the WORKBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device./* Open the "Work:" drawer. */ ADDRESS workbench WINDOW 'Work:' OPEN /* Activate the root window. */ WINDOW root ACTIVATE
WINDOWTOBACK [WINDOW] <ROOT|ACTIVE|Drawer name>WINDOWTOBACK WINDOWWINDOWROOT to push the the Workbench root window (where volume icons and AppIcons live) into to the background, ACTIVE to push the currently active Workbench window into the background or the fully qualified name of a drawer window. Note that the drawer window must already be open.WORKBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device./* Push the root window into the background. */ ADDRESS workbench WINDOWTOBACK root
WINDOWTOFRONT [WINDOW] <ROOT|ACTIVE|Drawer name>WINDOWTOFRONT WINDOWWINDOWROOT to bring the the Workbench root window (where volume icons and AppIcons live) to the foreground, ACTIVE to bring the currently active Workbench window to the foreground or the fully qualified name of a drawer window. Note that the drawer window must already be open.WORKBENCH.LASTERROR variable.Work: is a fully qualified name, and so is SYS:Utilities. Devs/Printers would not be a fully qualified name. A fully qualified name always contains the name of an assignment, a volume or a device./* Bring the root window to the foreground. */ ADDRESS workbench WINDOWTOFRONT root
ZOOMWINDOW [WINDOW] <ROOT|ACTIVE|Drawer name>ZOOMWINDOW WINDOWWINDOWROOT will use the Workbench root window (where volume icons and AppIcons live), ACTIVE will use the currently active Workbench window. Any other fully qualified path name will use the drawer window corresponding to the path.WINDOW parameter is specified, this command will try to operate on the currently active Workbench window.WORKBENCH.LASTERROR variable./* Change the root window. */ ADDRESS workbench ZOOMWINDOW root
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.