wiki:Documentation/ARexxAPI/READSAVE

Version 4 (modified by damato, 8 months ago) (diff)

--

Languages:

READSAVE

NAME
ReadSave -- Save a part of the message in the active Read window to a file. (V2.0)
TEMPLATE
PART/N,FILENAME/K,OVERWRITE/S
FUNCTION
Saves a part of the message in the active Read window to a file.
INPUTS
PART/N - part of the message to save, possible values are 1 for the first part of the message (usually the body), 2 or higher for further parts, or no value at all to get a printout of the visible part of the message
FILENAME/K - filename to use
OVERWRITE/S - avoid any security requesters opened due to an already existing file
RETURNS
RC is set to 10 if the specified part doesn't exist, if the file couldn't be written to or if no Read window was previously specified as "active" with MAILREAD.
NOTES
EXAMPLE
/* Enable result codes */
OPTIONS RESULTS

/* Silently decode the current message */
MAILREAD QUIET

/* Save the body to a file, then close the message */
READSAVE 1 FILENAME 'mail:important'
READCLOSE
BUGS
The command used to blindly act upon the first Read window opened at any given time; this was changed in V2.4 to require the use of MAILREAD to explicitely mark a window as "active".
SEE ALSO
MAILREAD, READINFO