/************* ROT 13 ******************/
/* ARexx Rot13-script by Tom De Mulder */
/* $VER Rot13.spot V1.2 (24.07.93)     */
/*                                     */
/*   Contact me on 2:291/708.10        */
/***************************************/

ADDRESS SPOT
OPTIONS RESULTS
cr = '0d'X

'ismessages'
if rc = 5 then do
   'requestnotify "Use in message window only!"'
   exit
   end

'getsubject'
subj = result

'requestresponse "Rotate subject ?"'
if rc = 0 then do
   subj = TRANSLATE(subj,'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
   end

'saveascii "T:RotSpot13.tmp" OVERWRITE NOTEARLINE'
call open in,"T:RotSpot13.tmp",read
call open out,"T:Rot.tmp",write

do dell = 1 to 5
 vidl = readln(in)
end

do while ~EOF(in)
 inline = readln(in)
 outline = TRANSLATE(inline,'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
 call writeln out, outline
end

call close in
call close out
address command 'Delete >NIL: T:RotSpot13.tmp'

'edit SUBJECT "'subj'" FILE "T:Rot.tmp" NOREQ'
address command 'Delete >NIL: T:Rot.tmp'

Exit
