With reference to 'Join the parts' by me

Hello All
>   This little script shows up a bug in MD-II. But also allows you to
> re-combine files split across more tham one message. Just make sure MD-II is
> saving the first part to 'T:' else it will not work.

 The 'NOREQ' option in the 'ExtractSelectedMsgs' only saves the file to the
Microdot path, so I've had to work with that, and this version of the script
will build the file in the MD-II directory, but will still convert the
result into 'RAM:'. You need to have the 'MD2_LASTUSEDDIR' in 'ENV:'.
 I hope this makes the script usable.

--- 8< -- Cut Here -- 8< ---
/*
 $VER: 0.03 JoinTheParts_MD.rx (27-12-2000)
 $AUTHOR: by Jules <[EMAIL PROTECTED]> ©2000
 $DESCRIPTION: Stick Uudecode attachments back together.

 This script should join the parts of a file which has been
 split across a number of messages, I hope.

Libraries:
 ixemul.library (v48)
 reqtools.library (v37,1413)
 rexxreqtools.library (v38)
Command:
 Uudecode (on Aminet, search slrn in News/Comm)

Instructions:
 1) Select but do not open the first part of the file; it must contain
    the the starting boundary.
 2) Run the script.
 3) Enter the number of parts in the first reqester, or if you
    run it from a 'shell', give the number as an argument.

Note:
 MD-II will only save a file to the 'Progdir' if the 'NOREQ' option is used.
 */

OPTIONS RESULTS
PARSE ARG PICOUNT
IF PICOUNT <1 THEN DO
 USINGREQTOOLS=0
 NL = '0a'x
 CALL ADDLIB("libs:rexxreqtools.library", 0, -30, 0)
 CALL RTGETLONG('2','How many parts do you'NL'wish to join together.','Come togerther 
right now',
 ,"_Yes please|_No thank you",'RTGL_MIN=2 RTGL_MAX=99')
 IF RTRESULT~=1 THEN DO ; EXIT ; END
 PICOUNT=RESULT
 USINGREQTOOLS=1
END
IF PICOUNT<2 THEN EXIT
CALL PRAGMA 'DIRECTORY','T:'
ADDRESS MD.1 ; ExtractSelectedMsgs File 'EXTRACTEDFILE' NOREQ
DO EE=2 TO PICOUNT
 GOTOMSG NEXT ; ExtractSelectedMsgs File 'EXTRACTEDFILE' PART 1 APPEND NOREQ
END
ADDRESS COMMAND 'WAIT'
CALL PRAGMA 'DIRECTORY','RAM:'
CALL OPEN('MDP','ENV:Vapor/MD2_LASTUSEDDIR','R')
MDPATH=READLN('MDP') ; CALL CLOSE('MDP')
ADDRESS COMMAND 'C:uudecode '||MDPATH||'/EXTRACTEDFILE >NIL:'
CALL PRAGMA 'DIRECTORY','SYS:'
IF  USINGREQTOOLS=1 THEN CALL rtezrequest('All done.',"Thank you")
                    ELSE SAY 'Complete.'
ADDRESS COMMAND 'C:DELETE '||MDPATH||'/EXTRACTEDFILE QUIET >NIL:'
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