Metropoli BBS
VIEWER: textfax.rexx MODE: TEXT (ASCII)
/*
 * TextFax.rexx
 * D. Varley, C-Born Software Systems
 * 14FEB94
 *
 * Synopsis:
 *	Example Rexx script to convert text->fax and call afax
 *	Written in response to query from Krzysztof Adamski
 *	This is just a quick demo, and could easily be jazzed up!
 *
 * Use:
 *	TextFax FaxFile
 *
 */
options results

/* trace results */	/* uncomment this line to debug */


address command

parse arg file user

/* do some error checking */
if file == "" then do
	say "Usage: TextFax textfile"
	exit(999)
end

/* Get Fax-file name */

sfnum = 0;
do sfnum = 0 to 1000
	sfname = "FAXSPOOL:S_"||sfnum||".AFX"
	if ~exists(sfname) then leave
	if sfnum >= 999 then do
		say "Error: Can't get fax file"
		exit(999)
	end
end

address command "afax:c/mkafax "||file||" "||sfname
address command "afax:c/afax -f "||sfname


[ RETURN TO DIRECTORY ]