With reference to 'Bulk attachments' by Patrick Ford
> But why does it use Snoopdos?
There is no apparent way to find out which file in the data cache belongs
to a message, so by monitoring which file is loaded when a message is read,
I can then do what ever I want with the contents of that file.
MD-II has always had a problem with broken threads when re-editing a
message which has been queued. The script below will send the message to an
editor of your choice, just remember to save and close the editor and close
and reopen the message to view any changes.
--- 8< -- Cut Here -- 8< ---
/*
$VER: 1.32 ReEditMD.mdrx (20-09-2000)
$AUTHOR: by Jules (JA888)� 2000
$DESCRIPTION: Stop Microdot from breaking threads.
Create a button in your 'Message list window'
'Action' string, put the path of this script
Note
This script will not run from MD-II menu.
Instructions
1) Enter the path to your text editor.
2) If 'Snoopdos' is not in your system path, enter the new path.
4) Open the 'Spool' directory, and select, but do not open
the message you wish to re-edit.
5) Run ReEditMD.mdrx, and wait for it to open editor.
! Warning ! Do not alter header information, unless
you know what you are doing.
6) 'Save' the message, and 'Close' the editor, when you have
finished your alterations.
7) Close and re-open the message, to view your new message.
*/
/*
The path to your editor. Example EDITO="SYS:TOOLS/EDITPAD"
*/
EDITO="SYS:TOOLS/EDITPAD"
/*
And the path of Snoopdos. Example SNOOP="SYS:Tools/Snoopdos"
*/
SNOOP="SNOOPDOS"
/*
Check that Microdot is running
*/
IF ~SHOW('P','MD.1') THEN DO
EXIT
END
/*
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 "%50n"
/*
Read the message in MD-II
*/
ADDRESS MD.1 ; READSELECTEDMSGS ; ADDRESS COMMAND 'WAIT 1'
/*
Save the SnoopDos Buffer
*/
ADDRESS SNOOPDOS ; SAVEBUFFER "T:SnoopMD"
/*
Find the correct line.
*/
DETEC=0 ; PDRAW="" ; DFILE=""
CALL OPEN('MD','T:SnoopMD','R')
DO UNTIL DETEC>1 ; PDRAW=READLN('MD') ; DETEC=POS('DBX_',PDRAW) ; END
DFILE=READLN('MD')
CALL CLOSE('MD')
QUIT
/*
Give it a hair cut
*/
TARGETFILE=TRIM(PDRAW)||"/"||TRIM(DFILE)
/*
Send it to the editor
*/
ADDRESS COMMAND EDITO TARGETFILE
ADDRESS COMMAND 'DELETE T:SnoopMD QUIET'
EXIT
--- 8< -- And Here -- 8< ---
--
Regards
Jules
--
I will not cut corners
" " " " "
-- Bart Simpson
__________________________________________________________________
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