Hello All

  If you've ever had a news message only half arrive you'll know that trying
to re-fetch it is a pain. So I wrote this script to kill the body of the
message, so that MD-II will try again. It's just a matter of closing the
message, running the script, closing and re-opening the message, 'MD'
will be unable to find the body and attempt to fetch it from your news
source.

-- 8< -- Cut here -- 8< --
/*
 $VER: 1.1 KillMessageBody.rx (21-02-2002)
 $AUTHOR: by Jules (JA888)© 2000
 $DESCRIPTION: Kill message body.
 Create a button in your 'Message list window'
 'Action' string, put the path of this script

 If you've ever had a news post fail to arrive fully and
 you want to try to re-fetch it, then you will need to kill
 the body of the message.

  Instructions
  1) If 'Snoopdos' is not in your system path, enter the new path
     in this script.
  2) Select, but do noy open the message.
  3) Run this script, to kill the body.
  4) Wait for disk activity to stop.
  5) Close and re-open the message, and MD will try to reload the message.
 */

/* And the path of Snoopdos. Example SNOOP="SYS:Tools/Snoopdos" */
SNOOP="SNOOPDOS"

/* Check that Microdot is running */
IF ~SHOW('P','MD.1') THEN EXIT
IF EXISTS('T:SnoopMD') THEN ADDRESS COMMAND 'DELETE T:SnoopMD QUIET'

/* Check if SnoopDos is running; if not, then start it */
SNOOPPATH="RUN >NIL: "||SNOOP||" HIDEMETHOD=TOOLSMENU HIDE"

IF ~SHOW('P','SNOOPDOS') THEN DO
 ADDRESS COMMAND SNOOPPATH
 ADDRESS COMMAND "WAITFORPORT SNOOPDOS"
 END

/* Set up Snoopdos */
ADDRESS SNOOPDOS ; CLEARBUFFER ; FORMAT "%255n"
FUNCTIONS NONE ; NOCHANGEDIR ; NOSHOWFULLPATH ; NOONLYSHOWFAILS
NOSHOWCLI ; NOMONITORPACKETS ; NOPACKETDEBUGGER ; NOMONITORROMCALLS
IGNORESHELL ; NOUSEDEVICENAMES ; SHOWFULLPATH ; OPEN

/* Read the message in MD-II */
ADDRESS MD.1 ; READSELECTEDMSGS

/* Save the SnoopDos Buffer */
ADDRESS COMMAND 'WAIT 1'
ADDRESS SNOOPDOS ; SAVEBUFFER "T:SnoopMD"
ADDRESS COMMAND 'WAIT 1'
QUIT
IF ~EXISTS('T:SnoopMD') THEN EXIT

/* Find the correct line. */
PDRAW=""
CALL OPEN('MD','T:SnoopMD','R')
PDRAW=READLN('MD')
DO UNTIL POS('DBX_',PDRAW)>0
 PDRAW=READLN('MD')
END
CALL CLOSE('MD')
/* Kill it */
ADDRESS COMMAND 'DELETE 'PDRAW' DELETE T:SnoopMD QUIET'
EXIT

-- 8< -- And here -- 8< --

-- 
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