Copyright (c) Hyperion Entertainment and contributors.

UI Style Guide ARexx

From AmigaOS Documentation Wiki
Jump to navigation Jump to search

ARexx

Previous chapters covered aspects of the GUI and the Shell. The third built-in Amiga interface is ARexx.

Like the Shell, ARexx is a text-based facility for giving commands to the Amiga, but while the Shell operates externally to programs (copy, delete, etc.), ARexx can operate internally with programs.

ARexx has two main uses: as a scripting language and for Inter-Process Communication (IPC). With the latter, ARexx acts as the standard hub for programs to communicate with each other by sending command and data messages.

Scripting and IPC

The ability to handle macros, or scripts, is a powerful feature for any application. Whenever a user has a repetitive, well-defined job to do with application software, scripts allow him to automate.

For example, many communications programs allow the user to set up a macro that will dial the phone number of a host system, log into it, check for messages and download those messages for later reading. The macro allows the user to do automatically what is usually done interactively.

Note
ARexx provides Amiga users with a standard macro language.

Benefits of ARexx

Unfortunately, if every application vendor creates his own macro language, the user will have to learn several macro languages instead of just one. Also, each developer would have to spend time creating a new macro language.

With ARexx in place as a system-level macro language, there exists a consistent syntax and user interface for all applications. Part of the reason it can do this is its versatility. Although ARexx is an interpreted language with its own set of keywords, these keywords can be extended to include new words specific to your application.

ARexx has another role, too. It is the system module that allows application software from different vendors to inter-operate, share data and communicate with one another in a multitasking environment. For instance, with ARexx a communications package could be set up to download data from a financial bulletin board and pass the data to a separate spreadsheet application for further analysis.

Note
ARexx is based on REXX, variants of which are used across many platforms.

When told about ARexx, most people imagine its use by power users - but the benefits of ARexx aren't strictly limited to power users. In a corporate environment, an information manager could take off-the-shelf software, throw in a mix of macros, batch commands and IPC, and come up with a system that truly meets the needs of his office. Once set up, the new, customized program could be used even by novices.

Value-added resellers can use ARexx to design a custom front end that melds applications from different vendors. The result is a highly-specialized tool and an instant niche market for the application vendor.

ARexx is like an open door on your application. Supporting it leaves the user free to combine your program with others - as a result, buyers of your program could end up using it in ways you never imagined.

Standards for ARexx

In order for your program to work with ARexx, it must have an ARexx interface: a software structure that allows your application to send and receive messages from ARexx.

If your application supports scripts, it should do so via ARexx. Even if your program doesn't use macros, you are urged to add an ARexx interface.

Having said that, the purpose of the rest of this chapter is simple: to give a listing of standard ARexx commands so the same commands do the same thing from program to program.

The fast-growing popularity of ARexx combined with its flexibility create, unfortunately, the likelihood of command name and function conflicts. It's frustrating to the user when the OPEN command works differently in his paint program than in his typesetting program.

Your program should support at least a minimal subset of ARexx commands. It increases the power of your program, and as a powerful and seamless standard, it's good for the platform as a whole. Applications that don't support ARexx decrease the overall power and lure of the Amiga. Average users who decide to learn ARexx will almost certainly experience frustration when they run into the brick wall of the program that doesn't support ARexx.

Once you learn how, incorporating ARexx support into your application requires about as much programming effort as supporting menus - without having to deal with the graphics. This chapter discusses which ARexx commands to support and the style in which they should be supported. For more details on the ARexx language itself refer to the Release 2 Users Manual Using the System Software.

General Description and Guidelines

ARexx is an interpreted programming language. As in BASIC, ARexx scripts can be written with any text editor and run without having to use a compiler. If an error occurs, ARexx outputs error messages indicating which line or lines are in error so the user can make changes and try again.

ARexx is unique in that an ARexx script can contain commands that are specific to ARexx as well as commands that are specific to an application. ARexx provides commands typical of most programming languages (variable manipulation, arithmetic, conditional loops, string manipulation, etc.).

Your application should provide, through ARexx, a subset, or even a superset, of the commands available through the GUI. This refers to menu or action gadget commands such as New, Save, Save As... and Quit.

By combining ARexx commands and application-specific commands, the user can create simple or complex scripts to automate common tasks, create new functions, and integrate application software.

For the sake of consistency, your application's ARexx commands should be similar in syntax to the AmigaDOS commands. They take the form:

 COMMAND [<argument1>, <argument2>...]

where COMMAND is a keyword that your application recognizes followed by a list of arguments. In many cases the arguments will be optional and your application should be set to take some default action.

As a general rule, your command set should:

  • honor the AmigaDOS style of pattern matching (e.g. the #? wildcard) when appropriate;
  • not be case-sensitive, and keywords should not contain spaces;
  • recognize and accept quoted arguments;
  • be verbose rather than terse (the user can make more sense of a keyword called OPEN versus O);
  • accept abbreviations for commonly used commands.

Errors

ARexx scripts can be written by the everyday user or the professional programmer. Scripts must be able to handle error conditions and take some kind of action when an error occurs (i.e. notify the user, prompt the user, terminate, etc.). Therefore, it is important that your application return error codes when a command cannot be performed.

The standard convention in ARexx is for application-specific commands to return error codes of zero (0) for no error, five (5) for warnings such as "Aborted by user", ten (10) for errors such as "<file> wrong type", and twenty (20) for failures such as "Couldn't open the clipboard".

Return codes are placed in ARexx's special variable called "RC" which can be checked for an manipulated in an ARexx script. For example, the user might try to save a file using the "SAVEAS" command. If the file could not be saved for any reason, it would be appropriate to return an error code of ten (10) so that the script could be terminated early, or some other action could be taken.

You may choose to support a more comprehensive set of error codes. This is acceptable but your application should still return zero (0) for no error and use return codes of less than ten (10) for warnings.

Returning Data

Some commands may return information back to ARexx. For example, a text editor or word processor might have a command that returns the string of text under the cursor. The string of text would be placed in a special ARexx variable called RESULT; the user, however, should be allowed to override this with a VAR or STEM switch in the command.

VAR = return the value.
STEM =place the value in the specified variable.

In order for result strings to be returned to ARexx, the script must use ARexx's OPTIONS RESULTS command. This command tells the application that it is OK to return result strings. Data placed in RESULT can then be copied and manipulated within an ARexx script.

Here's an example: a text editor supports a command called GETLINE that returns the line of text under the cursor. The following is a sample ARexx script that uses the GETLINE command to get the line of text under the cursor and place it in a variable called "line". Note that comments are surrounded by pairs of "/*" and "*/".

  /* Example ARexx script */

  OPTIONS RESULTS

  'GETLINE'   /* Command telling the application to
                 return the line of text under the
                 cursor. */

  line=RESULT /* Set the variable called "line" equal
                 to ARexx's special variable called
                 "RESULT". */

If the VAR (simple variable) or STEM (complex variable) switches are used, information should be placed into the named variable. For instance:

  MYCOMMAND STEM comresult

This would place the return result in the variable named comresult. The VAR and STEM switches make it easier for applications from different vendors to operate on the same data under ARexx.

Text strings that contain records with spaces should be returned with quotes around the record. A space should separate multiple records. For example, if you were trying to return the following list of records:

  Letter to John Doe
  Notes on Standards
  Addresses of the Stars

the information would be returned as:

  "Letter to John Doe" "Notes on Standards" "Addresses of the Stars"
<pre>

When the command returns multiple records, it should allow the user to specify a stem variable to place the contents in. For example, a command that would return the names of the loaded documents in a text editor would normally return information in the RESULT field, but if the user chooses to place the information in a stem variable, he could specify:

<pre>
  GETATTRS DOCUMENTS STEM DocList.

which would return:

  DocList.count = 3
  DocList.0 = Letter to John Doe
  DocList.1 = Notes on Standards
  DocList.2 = Addresses of the Stars

In the above example, DocList.count contains the number of records in the array. Also note that the elements do not contain quotes around the information.

ARexx Port Naming

Part of the job of supporting ARexx is adding an ARexx port to your application - this is a software structure through which ARexx communicates with your program. Each ARexx port must have a unique name and must be in upper-case. In ARexx, a port name is derived from:

 <basename>.<slot #>

In the above line, <basename> is the same name your application's executable uses (see Chapter 2), and <slot #> is the next available ARexx port slot for that application.

This ARexx port name should be displayed in the window brought up by the About menu item (along with the version of your application, etc.). The user should also have the ability to rename the port. Being able to specify the ARexx port name in the project icon's Tool Types field, or from the command line by using the PORTNAME keyword, is a good thing.

Unique port names should be given to each project started within your application and for each instance of your application. For example, a fictional word processing package named GonzoWord with a basename of GWord should have an ARexx port of GWORD.1 when the first document is opened. A second document running concurrently should be given the port name of GWORD.2. If the user opened the GonzoWord program again without choosing QUIT in the first instance, that third document should have a port name of GWORD.3.

Command Shell

Your application should allow the user to open a console window or command shell within your application's environment. There are two possible ways of handling this: you can provide a window that looks like a basic Shell window or one that looks like Workbench's Execute Command window.

Fig 9.1: Workbench's Execute Command window
Fig 9.2: A sample ARexx command shell

Commands entered into this window would allow direct control of your application.

As with any other type of window, your application should allow to user to snapshot the placement and size of the command shell.

Standard ARexx Commands

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

As listed here, the command template is named in bold on the first line. The definition for the command is on the following line, and that is followed by 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 file name via a file requester. FORCE suppresses the modified project requester.
SAVE ,
This command saves the current project to the current file name. If the project is unnamed, bring up the file requester so that the user can specify a file name.
SAVEAS NAME/K
This command saves the current project to the specified file name. 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 file name.
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

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 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.

Other Common ARexx Commands

These commands aren't applicable for every program, but please use them if your program provides this sort of functionality.

Cursor Positioning Commands

GOTOLINE /N/A
This command moves the cursor to a specified line.
GOTOCOLUMN /N/A
This command moves the cursor to a specified column.
CURSOR UP/S/,DOWN/S,LEFT/S/RIGHT/S
CURSOR moves the cursor up, down, left or right a single line or column position.
LINE /N/A
LINE accepts positive or negative arguments to move the cursor up or down relative to its current position.
COLUMN /N/A
COLUMN accepts positive or negative arguments to move the cursor left or right relative to its current position.
NEXT WORD/S,SENTENCE/S,PARAGRAPH/S,PAGE/S
NEXT moves the cursor to the next word, sentence, paragraph or page.
PREVIOUS WORD/S,SENTENCE/S,PARAGRAPH/S,PAGE/S
PREVIOUS moves the cursor to the previous word, sentence, paragraph or page.
SETBOOKMARK /N
This command is used to remember a place in text. If the program supports multiple bookmarks, a number can be used to differentiate them.
GOTOBOOKMARK /N
Move cursor to a bookmark. If the program supports multiple bookmarks, a number can be used to differentiate them.
POSITION SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S
POSITION moves the cursor to the position specified by the argument. SOF moves it to the beginning of the file. EOF moves it to the end of the file. SOL moves it to the beginning of the current line. EOL moves it to the end of the current line. SOW moves it to the start of the current word. EOW moves it to the end of the current word. SOV moves it to the top of the current view. EOV moves it to the bottom of the current view.

Find and Replace Commands

FIND TEXT/F
FIND searches for text that matches the specified string. If no string is specified on the command line, a requester should be presented allowing the user to enter a search string.
FINDCHANGE ALL/S,PROMPT/S,FIND/K,CHANGE/K
PROMPT brings up a requester. FIND searches for the string specified after the keyword. CHANGE replaces the specified FIND string with the string specified after the CHANGE keyword.
FINDNEXT ,
This moves the cursor to the next occurrence of the current search string without displaying a requester.

Other Text-Related Commands

TEXT TEXT/F
This command can be used in ARexx macros, allowing text to be entered via a command and honoring word wrap, insertion or any other current modes.
UPPERCASE CHAR/S,WORD/S,LINE/S,SENTENCE/S,PARAGRAPH/S
LOWERCASE CHAR/S,WORD/S,LINE/S,SENTENCE/S,PARAGRAPH/S
SWAPCASE CHAR/S,WORD/S,LINE/S,SENTENCE/S,PARAGRAPH/S
These three commands can be used if your program has the ability to swap the case of a letter or letters. The default switch should be WORD.
FONT NAME/S,SIZE/N,ITALIC/S,BOLD/S,PLAIN/S,UNDERLINED/S
Use this command if your application supports font selection. A combination of the text style arguments should be allowed following the SIZE argument
UNDO /N
This command reverts back to the last state of the project. If your program supports multiple levels of undo, a number should be recognized as an argument. The default should be one level of undo.
REDO ,
For applications with multiple levels of UNDO, REDO will allow the user to undo the UNDO command. See Chapter 6 for more information.

Window-Related Commands

MOVEWINDOW LEFTEDGE/N,TOPEDGE/N
This command should be used to change the position of a window. An argument of -1 means no change or don't care. Your application should either do the best job it can to move the window to the specified position, or return an error code.
SIZEWINDOW WIDTH/N,HEIGHT/N
This command should be used to change the size of a window. An argument of -1 means no change or don't care. Your application should either do the best job it can to size the window or return an error code.
CHANGEWINDOW LEFTEDGE/N,TOPEDGE/N,WIDTH/N,HEIGHT/N
This command is similar to MOVEWINDOW and SIZEWINDOW but the application should move and size the window as one operation. This is important to the user because moving a window to a new size and position can require as many as three commands, depending on the original

position and size as well as the target position and size.

WINDOWTOFRONT ,
This command moves a window to the front.
WINDOWTOBACK ,
This command moves a window behind all others.
ACTIVATEWINDOW ,
This command activates a window.
ZOOMWINDOW ,
If your program supports zoom gadgets on your windows, use this command to make a window small.
UNZOOMWINDOWS ,
If your program supports zoom gadgets on your windows, use this command to unshrink it.

Telecommunications Commands

BAUD /N
This command sets the baud rate.
PARITY EVEN/S,ODD/S,NONE/S
Use this command to set the parity.
STOPBITS 1/S,0/S
Use this to set the stopbits.
DUPLEX FULL/S,HALF/S
Use this to set the duplex mode.
PROTOCOL /K
Use this command to set the protocol.
SENDFILE NAME/K
Use this to start a file send. If the file name is omitted, the user should be presented with a file requester.
CAPTURE NAME/K
Use this to open a capture buffer. If the file name is omitted, the user should be presented with a file requester.
DIAL NUM/F
Use this command to dial a phone number.
REDIAL ,
Use this to redial the last phone number.
SEND ,
Use this to send a text string.
WAIT ,
Use this to wait for a text string.
TIMEOUT /N
Use this to set the timeout value (in seconds) for waits.

Miscellaneous Commands

TEXTPEN /N
BACKGROUNDPEN /N
Text-oriented applications that support the ability to set pen and paper colors can use these two commands. Valid values should be bounded by the screen's maximum number of colors rather than by existing Amiga hardware.
LOCKGUI ,
This inhibits the graphical user interface of the application.
UNLOCKGUI ,
This undoes LOCKGUI, allowing GUI events to resume.
GETATTR OBJECT/A,NAME,FIELD,STEM/K,VAR/K
GETATTR obtains information about the attributes of an object. OBJECT specifies the object type to obtain information on. NAME specifies the name of the object. FIELD specifies which field should be checked for information. STEM (keyword) specifies that the information is to be placed in the following stem variable rather than the RESULT field. VAR (keyword) specifies that the information is to be returned in a simple variable.
In the above OBJECT argument, the user could be seeking information on the attributes of any of the following items:
  • APPLICATION
  • PROJECT <name>
  • WINDOW <name>
  • PROJECTS
  • WINDOWS
If the destination variable is a stem variable, the following fields are recommended:
APPLICATION
would consist of the following nodes (an aspect of APPLICATION that the user can seek sub-information about):
  • .VERSION Contains the current version information for the application.
  • .SCREEN Contains the name of the screen that the application resides in (if the screen is public).
PROJECTS.COUNT
would contain the number of projects;
PROJECTS.0 through PROJECTS.n would contain the handle for the project.
PROJECT
would consist of the following nodes. Other variables could be added based on the type of application. For example, a text editor could add a variable called .LINES that would contain the number of lines in the project's file.
.AREXX Contains the ARexx port assigned to the project.
.FILENAME Contains the complete filename of the project.
.PATH Contains the path portion of the filename.
.FILE Contains the file portion of the filename.
.CHANGES Contains the number of changes made to the project (since last save).
.PRIORITY Priority at which the project's process is running. Allows the user to set the priority. For example, a 3-D modelling application could be working on several different projects at one time. Using this field, the user would be able to give more time to the most important project.
WINDOWS.COUNT
would contain the number of windows;
WINDOWS.0 through WINDOWS.n would contain the handle for the window.
WINDOW
would consist of the following nodes:
.LEFT Left edge of the window.
.TOP Top edge of the window.
.WIDTH Width of the window.
.HEIGHT Height of the window.
.TITLE Window title.
.MIN.WIDTH Minimum width of the window.
.MIN.HEIGHT Minimum height of the window.
.MAX.WIDTH Maximum width of the window.
.MAX.HEIGHT Maximum height of the window.
.SCREEN Name of the screen in which the window resides.
SETATTR OBJECT/A,NAME,FIELD,STEM/K,VAR/K
SETATTR manipulates the aspects of an object.
  • OBJECT specifies the object type to manipulate.
  • NAME specifies the name of the object.
  • FIELD specifies which field should be modified.
  • STEM specifies that the information is to be extracted from the following stem variable.
  • VAR specifies that the information is to be extracted from the following simple variable.
WINDOW NAMES/M,OPEN/S,CLOSE/S,SNAPSHOT/S,ACTIVATE/S,MIN/S,MAX/S,FRONT/S,BACK/S
WINDOW allows the user to manipulate several aspects of the window.
  • NAMES specifies a list of windows to manipulate. This command should support wildcard expansion.
  • OPEN is used to indicate that the window(s) should be opened.
  • CLOSE is used to indicate that the window(s) should be closed.
  • SNAPSHOT records the current position and size of the named window(s).
  • ACTIVATE will make the window the input focal point.
  • MIN sets the named window(s) to the minimum size.
  • MAX sets the named window(s) to the maximum size.
  • FRONT places the named window(s) in front of other windows.
  • BACK places the named window(s) behind all others.
CMDSHELL OPEN/S,CLOSE/S
CMDSHELL opens a command shell so the user can interact directly with the application at a command level. CMDSHELL allows the user quick access to infrequently used functions or macros that are not bound to a key, menu or button.
ACTIVATE ,
ACTIVATE starts the GUI of an application. This involves "de-iconifying" it, bringing its screen to the front, unzooming the main window (ie. expanding it to its previously set size) and making that window active.
DEACTIVATE ,
This command shuts down the GUI of an application. DEACTIVATE restores the GUI to the state it was in before receiving the ACTIVATE command.
DISABLE NAMES/M
This command disables a command or list of commands. DISABLE should also disable any user interface items to which the command is bound. For example, if a command is bound to a gadget, then that gadget should be disabled as well. This command should support pattern expansion.
ENABLE NAMES/M
ENABLE makes a command or a list of commands available to the user. ENABLE should also enable the GUI items to which they are bound (see DISABLE). This command should support pattern expansion.
LEARN FILE/K,STOP/S
LEARN allows the application to build an ARexx macro consisting of the actions the user performs.
  • FILE specifies the name of the file in which the user will save the commands.
  • STOP tells the application to stop learning.
ALIAS NAME/A,COMMAND/F
ALIAS assigns a user-definable name to a function and its options.
  • NAME specifies what the new command will be called.
  • COMMAND represents the rest of the line where the command and whatever options are to be bound to that command are entered.
SELECT NAME/A,FROM/K,NEXT/S,PREVIOUS/S,TOP/S,BOTTOM/S
SELECT is used to select an object from a list of similar objects. The main use for this command is to allow the user to select the current project from a list of projects. Returns the name of the current project.
  • FROM specifies the list from which the user can select. The default should be the main project list.
  • NEXT specifies that the next object on the list should be selected.
  • PREVIOUS specifies that the previous object on the list should be selected.
  • TOP specifies that the first object on the list should be selected.
  • BOTTOM specifies that the last object on the list should be selected.

Advanced ARexx Commands

Increasingly, programmers are supporting ARexx commands that allow users to add their own ARexx scripts or even to modify the program's interface. If you would like your program to support any of the following functions, please use these standard commands:

BUTTON NAME/A,LABEL/K,WINDOW/K,PROMPT/S,CMD/F
Some applications could set aside a number of action gadgets (buttons) to which the user can assign ARexx scripts. The BUTTON command would allow the user to modify these special gadgets.
  • NAME specifies the name of the button to be edited.
  • CMD specifies the command name assigned to the button.
  • LABEL specifies the text label assigned to the button.
  • WINDOW specifies the window in which the button belongs. This should default to the active or last active Intuition window for that application.
  • PROMPT activates a window in which the user can graphically edit the button.
KEYBOARD KEY/A,WINDOW/K,GLOBAL/S,HOTKEY/S,PROMPT/S,CMD/F
KEYBOARD allows commands to be tied to keystrokes.
  • KEY specifies which keystroke to edit.
  • CMD specifies what command will be assigned to that keystroke.
  • WINDOW specifies which window the hotkey will perform in. It should default to the active or last active Intuition window for that application.
  • GLOBAL indicates that the keystroke will operate when any of the application's windows are active.
  • HOTKEY indicates that the keystroke will operate regardless of what window or application is active.
  • PROMPT gives the user a window in which to edit the keystroke.
MENU NAME/A,LABEL/K,MENU/K,WINDOW/K,PROMPT/K,CMD/F
MENU provides a means to add, edit or delete a menu item. MENU also allows access to the function that the menu item triggers.
  • NAME specifies which menu item the user will edit.
  • CMD speciifies what command will be assigned to the menu item.
  • LABEL assigns a text label to the menu item.
  • MENU specifies which menu strip the new or edited item will be added to.
  • WINDOW specifies which window the new or edited menu belongs in. This should default to the active or last active Intuition window for that application.
  • PROMPT (switch) activates a window in which the user can graphically edit the menu item.
NOP ,
The NOP command is a special do nothing command (short for No OPeration) that is often extremely useful. For example, if your program supports custom keyboard

definitions, it is often necessary to disable some keys when writing custom macros.

Programmable Requesters

When a user writes an ARexx macro, it is often very useful to be able to bring up a file requester, or other type of requester, as part of the macro. If your program supports programmatic access to its requesters, the following commands should be used:

REQUESTFILE TITLE/K,PATH/K,FILE/K,PATTERN/K
This command brings up a file requester. The user can specify the title, path and file name. If any of these arguments are omitted, they should be filled in with some defaults (eg. a default title and empty strings for path and/or file name).
The path and file name should be returned in RESULT. A warning should be returned if the user cancels the requester.
REQUESTSTRING PROMPT/K,DEFAULT/K
This command brings up a string entry requester. The user can specify a prompt string and a default string to be placed in the string editing gadget. Like the REQUESTFILE command, defaults should be provided if arguments are omitted.
The string entered should be returned in RESULT. A warning should be returned if the user cancels the requester.
REQUESTNUMBER PROMPT/K,DEFAULT/K
This command brings up a number entry requester. The user can specify a prompt string and a default number to be placed in the string editing gadget. Like the REQUESTFILE command, defaults should be provided if arguments are omitted.
The number entered should be returned in RESULT. A warning should be returned if the user cancels the requester.
REQUESTRESPONSE TITLE/K,PROMPT/K
This command bring up a query requester. The user can specify a prompt string and possibly text for the OK and CANCEL gadgets if your program wants to support these additional options.
A warning should be returned if the user selects CANCEL.
REQUESTNOTIFY PROMPT/S
This command brings up a notification requester that can only be satisfied with an OK type of response.