Standard ARexx commands

The following commands are the minimum commands that your application should support. These commands are reserved across all aplications - don't use these commands for any other functions.

As listed here, the command is named in [italic] on the first line. Any options for that command are indented beginning on the second line. The definition for the command is on the following line, and that is followed by indented and bulleted definitions of the options. If the options are self-explanatory, no definition is given.

The commands are presented here in the same style as Shell commands discussed in Chapter 8. You should also use this style when you implement ARexx.

Your application should support at least these 15 ARexx commands.

Project-Related Commands

NEW PORTNAME/K
NEW creates a new project and work area. This command should return the ARexx port name assigned to the project.
- PORTNAME is used to assign a specific port name to the project.

CLEAR FORCE/S
This command clears the current project and its work area.
- FORCE suppresses the modified project requester.

OPEN FILENAME/K, FORCE/S
This command opens the specified project into the current work area. If no FILENAME is given, prompt the user for a filename via a file requester.
- FORCE suppresses the modified project requester.

SAVE
This command saves the current project to the current filename. If the project is unnamed, bring up the file requester so that the user can specify a filename.

SAVEAS NAME/K
This command saves the current project to the specified filename.
- NAME specifies what the new project will be called. If no name is provided, it should bring up the file requester so that the user can specify the filename.

CLOSE FORCE/S
This command closes the current project and window.
- FORCE suppresses the modified project requester.

PRINT PROMPT/S
PRINT will print the specified object using the current settings.
- PROMPT provides a requester for use in setting print parameters.

QUIT FORCE/S
QUIT stops the program. If the project was modified, the user should be prompted to save the work.
- FORCE suppresses the modified project requester.

Block-Related Commands

CUT
CUT removes the currently selected block of information from the project and places it in the clipboard.

COPY
COPY places a duplicate of the currently selected block of information into the clipboard.

PASTE
PASTE puts the contents of the clipboard into the project - at the currently active point.

ERASE FORCE/S
ERASE removes the currently selected block of information from the project.
- FORCE suppresses the "Are you sure" requester?

Other Standard Commands

comma = no arguments
/A = always required
/F = final argument
/K = keyword required
/M = multiple arguments
/N = number
/S = switch keyword
/T = toggle keyword

HELP COMMAND, PROMPT/S
HELP provides access to information about your application. Information about things such as the supported functions and parameters required for functions should be readily available. When triggered from a non-graphical user interface, HELP should present the user with a text list of all the commands that the application supports.
- COMMAND presents the user with the list of options available for that command.
- PROMPT activates a graphical help system.

FAULT /N
FAULT gives the user the text message assigned to the given error number. The text should be sent to the RESULT field. (See the Returning Data section.)

RX CONSOLE/S, ASYNC/S, COMMAND/F
RX allows the user to start an ARexx macro.
- CONSOLE indicates that a console (for default I/O) is needed.
- ASYNC indicates that the command should be run asynchronously.
- COMMAND sends whatever is typed on the rest of the line (usually a command) to ARexx for execution.