Reference - ARexx interface

With the help of ARexx scripts, you can add new functions to YAM or let it do things automatically.
YAM offers a set of commands (listed in this documentation both by name and by function) which can be called through the YAM ARexx port. They are explained along the following
subchapters using the following format:

NAME

The name of the command, a short description of what it does and the YAM version where the command was implemented.

TEMPLATE

Arguments and options accepted by the command. The template uses special characters that indicate the particular type of argument expected, following the AmigaDOS template style:

/A The parameter is compulsory/K The parameter must be preceeded by the keyword/N Numerical argument or result/M Argument or result is a list of zero or more elements/S The parameter works as a switch; the switch is in use when the parameter is given

FUNCTION

Describes what the command will do.

INPUTS

Describes in detail the parameters accepted by the command.
Be careful when passing arguments containing spaces; for instance,

sub='Hello World''WRITESUBJECT'sub

won't work. It must be written as

'WRITESUBJECT "'sub'"'

or

'WRITESUBJECT "Hello World"'

Please note that because of the internal use of the ReadArgs() function, the ARexx Host requires to escape certain special characters like a newline (0x0a) or escape character (0x1b) if you want to have it included in your final string or otherwise it is stripped by the ReadArgs() function.

This means that you have to use the following escape sequences in your provided strings:

For example the following command would write a string to a texteditor containing a newline:

'WRITEEDITOR "TEXT Hello Joe,*N I would like to meet you."'

If a parameter represents a file name you should keep in mind that file names on AmigaOS might contain spaces or other special characters which will cause ARexx to treat the name as multiple words instead of a single word. Hence a file name should always be surrounded by quotes, no matter if it contains spaces or not. Scripts can very easily be tested for this case by letting them handle a file in the Amiga RAM disk, i.e. "RAM Disk:/foo/bar".

RETURNS

Returned info to be expected from the command. Commands may return results in three different kinds; let's look at these examples which use the FOLDERINFO command:

IMPORTANT NOTE: Always check the RC return code after the command execution before examining any further returned variables (e.g. as part of a STEM variable). Additional variables will only be set for successfully executed commands which return zero (0) in RC. A failed command execution (RC != 0) will leave these variables in an uninitialized state which could potentially lead to undesired results.

WARNING

Any sort of vital information you should be aware of when using this command.

NOTES

Various notes about the command.

EXAMPLE

A fragment of ARexx code to illustrate the usage of the command.

BUGS

Problems that are known or have already been fixed with this command.

SEE ALSO

Links to other related commands.

Grouped Function List

Commands supplied by MUI

HELP - Return a list of all the supported ARexx commandsHIDE - Iconify YAM INFO - Return information about the program QUIT - Terminate YAM SCREENTOBACK - Bring the YAM screen to the background SCREENTOFRONT - Bring the YAM screen to the foreground SHOW - Uniconify YAM

Address book handling

ADDRDELETE - Remove an entry from the address bookADDREDIT - Fill the fields of the current address book entryADDRFIND - Search the address book for one or more entriesADDRGOTO - Select an address book entry by aliasADDRINFO - Return information about an entry referred by aliasADDRLOAD - Load an address book by filenameADDRNEW - Create a new entry in the address bookADDRRESOLVE - Resolve an alias or nameADDRSAVE - Save the address book under a given filename

Message/Folder selection

FINDMAIL - Find a mail in all folders given a MessageIDGETSELECTED - Get the position of the messages selected in the current folderLISTSELECT - Select messages in the current folderSETFOLDER - Select the current folderSETMAIL - Select the current message in the current folder by numberSETMAILFILE - Select the current message in the current folder by filename

Message manipulation

GETMAILINFO - Return information about the active messageMAILARCHIVE - Move the selected messages to another folderMAILBOUNCE - Bounce the current messageMAILCHANGESUBJECT - Change the subject of the selected message(s)MAILCOPY - Duplicate the selected message(s)MAILDELETE - Delete the selected message(s)MAILEDIT - Edit the current messageMAILEXPORT - Export the selected message(s) into a fileMAILIMPORT - Import messages from a file into the current folderMAILINFO - Return information about a given messageMAILMOVE - Move the selected messages to another folderMAILREAD - Read the current messageMAILREPLY - Reply the currently selected messagesMAILSTATUS - Change the status of the selected message(s)READINFO - Get info about the attachments in the message being readREADPRINT - Print an attachmentREADSAVE - Save an attachmentSETFLAG - Set the PERmanent or VOLatile flag of a message

Network related

GETURL - Download a file from the WWW based on a given URLISONLINE - Detect whether YAM is currently transfering emailMAILCHECK - Download new emailMAILSEND - Send the messages in the Outgoing folderMAILSENDALL - Send all the messages in the Outgoing folder

Alphabetical Function List

ADDRDELETE - Remove an entry from the address bookADDREDIT - Fill the fields of the current address book entryADDRFIND - Search the address book for one or more entriesADDRGOTO - Select an address book entry by aliasADDRINFO - Return information about an entry referred by aliasADDRLOAD - Load an address book by filenameADDRNEW - Create a new entry in the address bookADDRRESOLVE - Resolve an alias or nameADDRSAVE - Save the address book under a given filenameAPPBUSY - Switch YAM to busy modeAPPNOBUSY - Bring YAM out of busy modeFINDMAIL - Find a mail in all folders given a MessageIDFLUSHINDEXES - Flush the index of all foldersFOLDERINFO - Return information about a given folderGETCONFIGINFO - Return information about the current userGETFOLDERINFO - Return information about the current folderGETMAILINFO - Return information about the active messageGETSELECTED - Get the position of the messages selected in the current folderGETURL - Download a file from the WWW based on a given URLHELP - Return a list of all the supported ARexx commandsHIDE - Iconify YAMINFO - Return information about the programISONLINE - Detect whether YAM is currently transfering emailLISTFREEZE - Forbid graphical updates to a listLISTSELECT - Select messages in the current folderLISTUNFREEZE - Permit graphical updates to a listMAILARCHIVE - Move the selected messages to another folderMAILBOUNCE - Bounce the current messageMAILCHANGESUBJECT - Change the subject of the selected message(s)MAILCHECK - Download new emailMAILCOPY - Duplicate the selected message(s)MAILDELETE - Delete the selected message(s)MAILEDIT - Edit the current messageMAILEXPORT - Export the selected message(s) into a fileMAILFILTER - Filter messages in the current folderMAILFORWARD - Forward the selected messagesMAILIMPORT - Import messages from a file into the current folderMAILINFO - Return information about a given messageMAILMOVE - Move the selected messages to another folderMAILREAD - Read the current messageMAILREPLY - Reply the currently selected messagesMAILSEND - Send the messages in the Outgoing folderMAILSENDALL - Send all the messages in the Outgoing folderMAILSTATUS - Change the status of the selected message(s)MAILUPDATE - Update the index of the current folderMAILWRITE - Open a new Write window to compose a new mailNEWMAILFILE - Return a free message slot for a given folderQUIT - Terminate YAMREADCLOSE - Close the active Read windowREADINFO - Get info about the attachments in the message being readREADPRINT - Print an attachmentREADSAVE - Save an attachmentREQUEST - Request a choice from the userREQUESTFILE - Request the user to select a fileREQUESTFOLDER - Request the user to select a folderREQUESTSTRING - Request the user for a stringRESTART - Restart YAMSCREENTOBACK - Bring the YAM screen to the backgroundSCREENTOFRONT - Bring the YAM screen to the foregroundSETFLAG - Set the PERmanent or VOLatile flag of a messageSETFOLDER - Select the current folderSETMAIL - Select the current message in the current folder by numberSETMAILFILE - Select the current message in the current folder by filenameSHOW - Uniconify YAMUSERINFO - Return information about the current userWRITEATTACH - Attach a file to a new messageWRITEBCC - Fill the BCC: header of a new messageWRITECC - Fill the CC: header of a new messageWRITEEDITOR - Pass an ARexx command to the internal editorWRITEFROM - Fill the FROM: header of a new messageWRITEIDENTITY - Choose the user identity to be used when composing a new mail WRITELETTER - Load a file into the internal text editorWRITEMAILTO - Fill the TO: header of a new messageWRITEOPTIONS - Set the options of a new messageWRITEQUEUE - Move a new message to the Outgoing queueWRITEREPLYTO - Fill the REPLY-TO: header of a new messageWRITESEND - Send a new messageWRITESUBJECT - Fill the SUBJECT: header of a new messageWRITETO - Fill the TO: header of a new message