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:
Some of these advanced commands allow the user to modify your program's interface.
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 acitve 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 filename. 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 filename).
The path and filename 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.