Jules <[EMAIL PROTECTED]> on 27 Feb 2002:
> Emilio Desalvo wrote about '[md-2] ROT-13 in MD-2' on Mon, 25 Feb 2002
>> Hello
>> How do I do ROT-13 encoding and decoding in MD-2?
For encoding I use dkROT13 from AmiNet.
>> Is there any AREXX macro?
See below ... but here is also a way without ARexx, I made two fonts
which look the same, but one of them is ROTted. So, if you chose that
font for displaying a message, you will see it unrotted (although it
isn't, be carefully when c&p'ing). It can be found at
<www.tu-bs.de/~y0013855/amiga.html>. </adv>
> The original message and script.
I played around a bit with that script ;-)
It will now skip the Header part, and show quotes and sigs in
different colours.
> -- 8< --
/* Rot13 for MicroDot-II */
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')
phrase = "dummy"
State = "Header"
Black = D2C(27)""'[32m'
White = D2C(27)""'[31m'
Blue = D2C(27)""'[33m'
Color = Black
First = XRange('a','m')
Last = XRange('n','z')
Alt = Upper(First)""Upper(Last)""First""Last
Neu = Upper(Last)""Upper(First)""Last""First
DO UNTIL eof('intmp')
phrase = readln('intmp')
IF State="Header" THEN DO /* Skip Header */
IF phrase = "" THEN State="Body"
ELSE NOP
END
ELSE DO /* Body or Sig */
IF phrase='-- ' THEN
State="Sig"
ELSE DO
IF State="Sig" THEN
Color = Blue
ELSE
IF Left(phrase,1)=">" THEN Color = Black
ELSE Color = White
newphrase=Color""Translate(phrase,Alt,Neu)
newln = writeln('outtmp',newphrase)
END
END
END
CLOSE('intmp')
CLOSE('outtmp')
/* SAY temp1 */
/* SAY temp2 */
ADDRESS command 'multiview' temp2
EXIT
> -- 8< --
--
Gruss, / "Yes, OE is definately a steaming pile of dung."
flori / Troy Parker in comp.sys.amiga.advocacy
__________________________________________________________________
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