@node "Arexx" NEW AREXX FEATURES ARexx Script This Project menu item opens a file requester to execute an ARexx file. It is useful for quickly running an ARexx script without having to set up a keyboard shortcut definition for it. Any ARexx script can be run; scripts are limited neither to those ending in .omed or .rexx, nor to those in the REXX: directory. There must not, however, be a space in either the path name or the file name. This has the unfortunate consequence that scripts in RAM: can't immediately be executed, because RAM: has the volume name "Ram Disk", which contains a space. To get around this, relabel RAM: with a name that doesn't contain a space. For example: relabel ram: RamDisk This can be put in OctaMED's startup-sequence (but make sure you're using a copy of the original disk!). ARexx Trigger Setup This window, opened through the Display menu, is home to a powerful new feature. Now, OctaMED's ARexx commands can be executed while playing a song, by assigning a player command to an ARexx command. As in the Keyboard Shortcuts window (and Input Map Editor), ARexx scripts, other programs' ARexx commands, and even whole programs can also all be executed by a single player command. The player command type that executes ARexx commands is 2D. 256 different ARexx commands can be assigned, as there are 256 possible command levels with type 2D (01 to FF). At the top of the window, select a player command to edit using the slider. Clear Current sets the current command's action to None. Clear All does the same to all commands. The Action area describes what the player command is to do if it appears in a song. It is exactly like the Action area in the Keyboard Shortcuts window and Input Map Editor. As a reminder, the top cycle gadget can take the following values: None: The player command has no effect. OctaMED Command: Executes an OctaMED ARexx command (type it into the Command box, with any required parameters). Execute ARexx File: Executes an ARexx script (type its name into Command.) Ext. ARexx Command: Sends an ARexx command to another program (type the command into Command, the program's ARexx port into ARexx Port). Launch Program: Launches (runs) an executable program (type its filename into Command). New ARexx commands OctaMED Soundstudio includes version 2 of OctaMED's ARexx support. New version 2 commands are listed in @{" Appendix E " link "AppE" 0} of this manual. When writing ARexx scripts that use the new commands, make sure that your script checks that the version of OctaMED running supports version 2 commands (that is, it is the Soundstudio rather than V6); otherwise, the commands will not work. To do this, include something like the following at the start of your script: 've_octamedrexx' if result < 2 then do 'wi_request "This script requires OctaMED Soundstudio to run.", "Proceed"' exit end Other new ARexx features "Show Changed Settings" in Miscellaneous Options: When on, whenever an ARexx option is changed, either within OctaMED or by using ARexx itself, its name and its new value is shown on the title bar. If "(S)" is shown, the option can be saved using Save Settings. This might be useful for debugging ARexx scripts, and for obtaining option names easily without having to look at the docs. It also serves as a confirmation message for keyboard shortcuts. There is a known bug in this feature: Negative settings values are displayed incorrectly. Error handling has been tidied up in the Soundstudio. If ARexx reports an error or produces any text output, OctaMED now opens an ARexx Output window to display the text. In V6, if ARexx reported an error, the computer would do nothing and it was difficult to work out what had gone wrong. Also, a "ARexx Program Not Found" requester is now shown if OctaMED tries to execute a non-existent ARexx script. OctaMED also reports if an external program's ARexx port cannot be opened. In the Command Shell (Project menu), type "clear" to clear the window. (The old BASIC command "cls" also works, as in V6.) @{" Contents " link "Main" 0} @endnode