Emilio Desalvo wrote about '[md-2] ROT-13 in MD-2'
on Mon, 25 Feb 2002 22:51:46 +0100 

> 
> Hello
> How do I do ROT-13 encoding and decoding in MD-2?
> 
> Is there any AREXX macro?

The original message and script.

-- 8< --
/* Rot13 */

if ~SHOW('LIBRARIES','rmh.library') then do
  if ~ADDLIB('rmh.library',0,-30,0) then exit
end

temp1=CreateTempFile()
temp2=CreateTempFile()

/* ADDRESS 'MD.1' */
ExtractSelectedMsgs temp1 NOREQ

OPEN('intmp',temp1,'R')
OPEN('outtmp',temp2,'W')

do until eof('intmp')
 phrase = readln('intmp')
 
newphrase=Translate(phrase,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890","NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm6789012345")
 newln = writeln('outtmp',newphrase)
end
CLOSE('outtmp')
CLOSE('intmp')

ADDRESS command 'multiview' temp2
EXIT
-- 8< --

The extra SAY lines are just to help me during writing it. What is
wrong with it? I think I need to specify PARTS= on the
ExtractSelectedMsgs line but I cant find the correct syntax or an
example. Also is there some sort of problem with MD2 1.44 displaying
more than one item in the ARexx menu?

... Death is just Life's way of telling you you've been fired.

--
http://www.nerds.co.uk            The place for computer enthusiasts
Andy Thomson                                                  _
High Wycombe, Bucks.                                         /_\
http://come.to/athomson                                     / | \

-- 
Regards

  Jules
__________________________________________________________________
MicroDot-II Mailing List - http://www.vapor.com/md2/
MicroDot-II FAQ: http://faq.vapor.com/md2/
Listserver Help: mailto:[EMAIL PROTECTED]?Subject=HELP
Unsubscribe....: mailto:[EMAIL PROTECTED]?Subject=UNSUBSCRIBE

Reply via email to