Chris Young worte on Fri, 04 Feb 2000 23:26:53 +0000
about [md-2] Re: ReEditMD.mdrx

> Hi Jules,
>
> On Tuesday 01-Feb-00, Jules wrote:
>
> >  There is a problem, with the 'Snoopdos'less way of working. If the mail
> > you are trying to edit contains a key word, ie. 'Newsgroups: ', in the
> > body of the text then the whole thing stops, ouch!
>
> Oops.  Is this the script or a bug in MD-2?
>
  The script; Ive put a simple switch in so that the 'Message id' can only be
updated once, and removed the 'Newsgroup: ' bit altogether, as it appeared not
to do anything. If you know of a reason for it being there, then please say so,
and I will put it back in.
  This is what it looks like at the minute, it works pretty well at the moment,
and do you think it would be worth posting it on the NC3 mailing list?

---- 8< cut here 8< ----
/*
 Send a Microdot message to an external editor
 $VER: SnoopMD.mdrx 1.34 (5.Feb.2000)
 $AUTHORS: Jules (JA888) and Chris Young
 Create a button in your 'Message list window'
 'Action' string, put the path of this script
 */

OPTIONS RESULTS

/*
 You need to enter the full path to your editor.
 Example DEST="SYS:TOOLS/EDITPAD"
 */

DEST ="SYS:TOOLS/EDITPAD"

ADDRESS MD.1

EXTRACTSELECTEDMSGS 'T:MD2.tmp NOREQ'

CALL OPEN('MD','T:MD2.tmp','R')
CALL OPEN('newmsg','T:MD2.new','W')

/*
 Message id and updated.
 */
MIF=0
DO UNTIL EOF('MD')
  DFILE=READLN('MD')
  IF MIF=0 THEN DO
    IF POS('Message-Id: ',DFILE) THEN DO
      IDFILE= SUBSTR(DFILE,13,10) ; JDFILE=SUBSTR(DFILE,23) ; MIF=1
      DFILE = 'Message-Id:' IDFILE || TIME('S') || '.' || JDFILE
    END
  END
  CALL WRITELN('newmsg',DFILE)
END

CALL CLOSE('MD')
CALL CLOSE('newmsg')

/*
 Now all we have to do is send it to a text editor
 */
ADDRESS COMMAND DEST 'T:MD2.new'

mistr='T:MD2.new GROUP �SPOOL'

MAILIMPORT mistr

REMOVESELECTEDMSGS

EXIT

---- 8<   and here    8< ----

  At the moment, you need to 'Save' and then close some of the text editors I
have tried.


--
Regards
  Jules

A 'tagline' in Microdot? never.


Reply via email to