/* ------------------------------------------------------------------------
  :Program.       ROT13Decrypt.pint
  :Contents.      decrypts ROT13 message and shows it in PINT's window
  :Author.        Martin Koyro [mk]
  :Address.       Snail Mail:              EMail:
  :Address.       Salzmannstr. 12          Martin Koyro @ MS3
  :Address.       48147 Münster            mk@bones.westfalen.de
  :History.       v1.0 [mk] 23-Mar-95
  :Copyright.
  :Language.      ARexx
  :Translator.    RexxMast
  :Usage.         ROT13Decrypt.pint

  Updated for PINT (22.2.97):
   Magnus Heino (nd95mho@Student.HGS.SE)
------------------------------------------------------------------------ */

/* Exit if Message Window is not active. */

OPTIONS RESULTS

STATUS
say RESULT
IF RESULT~="MESSAGE" THEN EXIT 5


/* We get PINT's message number, ... */

GETMSGNUM
MsgNum=RESULT

/* ... save the message, ... */

'SAVEMSGBODY' MsgNum 'TO T:rot13.tmp'

/* ... call rot13, ... */

EXEC 'rot13 T:rot13.tmp >NIL:'

/* ... and show the decrypted message. */

'REPLACEMSGBODY WITH T:rot13.tmp'

EXEC 'C:Delete T:rot13.tmp QUIET'
