home *** CD-ROM | disk | FTP | other *** search
Wrap
/* $VER: Multi File_Id & Extract For Dopus5 2.1 (2.5.95) Written by Pink Floyd Of Divine Additional material by Edmund Vermeulen. ARexx script for DOpus 5 to unpack arced files with progress indication. Call as 'REXX:What.dopus {f} FLAGS=Do All Files'. */ START: address command 'Delete T:File_Id.Diz' address command 'Delete T:File_Id.Di' Reg='DIVINE' Showme='Im Very Sorry But There Is No File_Id.Diz Availble' options results options failat 21 flag=Exists("Libs:rexxreqtools.library") if flag=0 then do say "! ERROR ! Libs:RexxReqTools.Library not found." Exit end addlib("rexxreqtools.library",0,-30) lf='0a'x /* ascii code for linefeed */ signal check MAIN: dest='RAM:T/' address 'DOPUS.1' parse arg '"' file '"' address command 'Delete T:File_Id.Diz' address command 'Delete T:File_Id.Di' if upper(right(file,4))='.DMS' then signal dms if upper(right(file,4))='.LHA' then Signal lha if upper(right(file,4))='.LZH' then Signal lha if upper(right(file,4))='.LZX' then Signal lzx if upper(right(file,4))='.NFO' then Signal txt if upper(right(file,4))='.DOC' then Signal txt if upper(right(file,4))='.TXT' then Signal txt if upper(right(file,4))='.EXE' then Signal ex1 if upper(right(ffile,4))~='' then signal no No: Call rtezrequest("Multi View & Extract For Dopus 5 By Pink Floyd Of Divine." lf " " lf "Im Sorry But Only The Following Formats Accepted At THe Moment." lf " *.DMS - *.LHA - *.LZX - *.TXT - *.NFO - *.DOC - *.EXE" lf " " lf " If You Wish To Get The Latest Release Of This Program " lf " " lf " Then Call One Of The Many Divine Sites Through Out The World " lf " And Leave A Message To Me Pink Floyd " lf " " lf " Okay That About Wraps It For Now Catch You Again Soon..","_Quit|_Exit","Multi View & Extract V2.5 ©95 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if RTResult = 1 then signal Quit if rtresult = 0 then signal exit end Quit: Call rtezrequest(" Before You Go Quick Greets Fly To The Following " lf lf " JB - SARGE - PIXIE - DEMONS - SQUEAKY - CHEM " lf " LAZZER - BOBCAT - EXILE - PURPLE MOTION - HUSTLER " lf " TRONIC - SIR SNOOZE - OI! - CYANIDE " lf " MANIC - MECHANIC - FROSTY - PASCAL - ARCH " lf " LIBRARIAN - HORROR KID - LORE - MEMPHIS " lf " NUMARK - SONIC - ARISTACAT " lf lf " A FEW GROUP GREETS FLY TO " lf " - DIVINE - HELLFIRE - PRESTIGE - LSD - ACCESS - MANIACS - ","_Quit|_Exit","Multi View & Extract V1.0 ©95 By Pink Floyd - Divine", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) exit end /* Start Windows */ /* ----------------------------------------------------------------------- */ LHA: cuthere=lastpos('/',file) if cuthere=0 then cuthere=pos(':',file) lhaname="'"substr(file,cuthere+1)"'" fileidl: if exists('T:FILE_ID.DIZ')then address command 'delete T:FILE_ID.DIZ quiet' ADDRESS command 'lha x > NIL: '||file||' FILE_ID.DIZ T:' if ~exists('T:FILE_ID.DIZ')then Signal Contl Showme="" call open('FileID','T:FILE_ID.diz','r') do until eof('FileID') Showme=Showme||lf||readln('FileID') end contl: rtezrequest(" " showme " ","_Extract|_Copy|_Move|_Delete|_About|_Next","Multi View V2.5 By Pink Floyd Of Divine", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then signal lhaw if rtresult = 2 then signal copy if rtresult = 3 then signal move if rtresult = 4 then signal delete if rtresult = 5 then signal about if rtresult = 0 then exit lhaw: rtezrequest(" Please Select " lf " Ram:T/ Or Select (A Path Desired By You.) ","_Ram:T/|_Select|_Next","Multi View V2.5 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then signal lhaw1 if rtresult = 2 then signal select if rtresult = 0 then exit select: dirname = rtfilerequest(, , "Please Pick A Directory",,, "rtfi_flags = freqf_nofiles rtfi_initialpath=Ram:T/ RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) if rtresult == 0 then signal fail else dest=dirname signal lhaw1 end lhaw1: lister new handle=result lister set handle busy on lister set handle path dest lister set handle progress 'Unpacking' lhaname'...' address command 'C:LHA x -x -M 'file dest parse var line ' ' line lister query handle abort if result then do address command 'Break' process 'C' lister set handle busy off lister set handle title 'UnLHA Aborted Or Finished...' exit end lister set handle busy off lister read handle dest force exit end */ ----------------------------------------------------------------------- */ LZX: cuthere=lastpos('/',file) if cuthere=0 then cuthere=pos(':',file) lzxname="'"substr(file,cuthere+1)"'" fileidl: if exists('Ram:FILE_ID.DIZ')then address command 'delete Ram:FILE_ID.DIZ quiet' ADDRESS command 'lzx x > NIL: '||file||' FILE_ID.DIZ RAM:' if ~exists('Ram:FILE_ID.DIZ')then Signal Contx Showme="" call open('FileID','Ram:FILE_ID.diz','r') do until eof('FileID') Showme=Showme||lf||readln('FileID') end contx: rtezrequest(" " showme " "," _Extract|_Copy|_Move|_Delete|_About|_Next","Multi View V2.5 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then signal lzxw if rtresult = 2 then signal copy if rtresult = 3 then signal move if rtresult = 4 then signal delete if rtresult = 5 then signal about if rtresult = 0 then exit lzxw: rtezrequest(" Please Select " lf " Ram:T/ Or Select (A Path Desired By You.) ","_Ram:T/|_Select|_Next","Multi View V2.5 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then signal lzxw1 if rtresult = 2 then signal select if rtresult = 0 then exit select: dirname = rtfilerequest(, , "Please Pick A Directory",,, "rtfi_flags = freqf_nofiles rtfi_initialpath=Ram:T/ RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) if rtresult == 0 then signal fail else dest=dirname signal lzxw1 end lzxw1: call close('FileID') address command 'Delete Ram:t/?#.* ALL' lister new handle=result lister set handle busy on lister set handle path dest lister set handle progress 'Unpacking' lzxname'...' address command 'lzx -x x ' file dest parse var line ' ' line lister query handle abort if result then do address command 'Break' process 'C' lister set handle busy off lister set handle title 'UnLzx Aborted Or Finished...' exit end lister set handle busy off lister read handle dest force exit end /* ----------------------------------------------------------------------- */ if reg~=left(e,1) then exit DMS: cuthere=lastpos('/',file) if cuthere=0 then cuthere=pos(':',file) dmsname="'"substr(file,cuthere+1)"'" fileidd: if exists('T:FILE_ID.DIZ')then address command 'delete T:FILE_ID.DIZ quiet' ADDRESS command 'dmsdescript > NIL: x T:FILE_ID.diz '||file if ~exists('T:FILE_ID.DIZ')then signal Contd else do Showme="" call open('FileID','T:FILE_ID.diz','r') do until eof('FileID') Showme=Showme||lf||readln('FileID') end Contd: rtezrequest(" " showme " ","_Extract|_Copy|_Move|_Delete|_About|_Next","Multi View V2.5 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then signal ext if rtresult = 2 then signal copy if rtresult = 3 then signal move if rtresult = 4 then signal delete if rtresult = 5 then signal about if rtresult = 0 then exit end EXT: rtezrequest("Insert disk in drive and then select "lf" destination for" dmsname".","DF0:|DF1:|FF0:|FF1:|FF2:|FF3:|FF4:|RAD:|_Exit","Dms Extraction", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then do Dest='DF0:' signal dmsw end if rtresult = 2 then do Dest='DF1:' signal dmsw end if rtresult = 3 then do Dest='FF0:' signal dmsw end if rtresult = 4 then do Dest='FF1:' signal dmsw end if rtresult = 5 then do Dest='FF2:' signal dmsw end if rtresult = 6 then do Dest='FF3:' signal dmsw end if rtresult = 7 then do Dest='FF4:' signal dmsw end if rtresult = 8 then do Dest='RAD:' signal dmsw end if rtresult = 0 then exit end dmsw: lister new handle=result lister set handle busy on lister set handle path dest lister set handle progress 80 'Unpacking' dmsname'...' address command 'C:Mount' dest address command 'Run >NIL: <NIL: DMS <NIL: >PIPE:dmsout WRITE' file 'TO' dest 'NOVERIFY NOTEXT' address command 'Status >T:ProcessNo COMMAND DMS' call open('temp','T:ProcessNo','r') process=readln('temp') close('temp') address command 'Delete >NIL: T:ProcessNo QUIET' nomessage=1 errorreport='' buffer='' call open('dmsout','PIPE:dmsout','r') /* output from DMS comes through PIPE: */ do until eof('dmsout') buffer=buffer||readch('dmsout',25) /* read portions of 25 characters */ here=verify(buffer,'0a0d'x,'m') /* check for new lines */ if here>0 then do line=left(buffer,here-1) /* one whole line */ if nomessage&left(line,7)='No Disk' then do lister set handle progress name 'Insert disk in' dest nomessage=0 end parse var line ' ' line /* get rid of some ugly stuff */ buffer=substr(buffer,here+1) if pos('ERROR',upper(line))>0 then do errorreport=errorreport||lf||line say '07'x /* beep the display */ end if pos('unPacking',line)>0 then do track=right(line,2) lister set handle progress count track+1 lister set handle progress name 'Track' track lister query handle abort if result then do address command 'Break' process 'C' lister set handle busy off lister set handle title 'UnDMS aborted...' exit end end end end call close('dmsout') if errorreport~=='' then dopus request '"The Error Report For You '||lf||errorreport'" OK' lister set handle busy off lister read handle dest force exit end /* ----------------------------------------------------------------------- */ TXT: cuthere=lastpos('/',file) if cuthere=0 then cuthere=pos(':',file) txtname="'"substr(file,cuthere+1)"'" fileidt: if exists('T:FILE_ID.DIZ')then address command 'delete T:FILE_ID.DIZ quiet' ADDRESS command 'C:TxtExtract e > NIL: T:FILE_ID.DIZ '||file if ~exists('T:FILE_ID.DIZ')then signal contt Showme="" call open('FileID','T:FILE_ID.diz','r') do until eof('FileID') Showme=Showme||lf||readln('FileID') end contt: rtezrequest(" " showme " ","_Read|_Copy|_Move|_Delete|_About|_Next","Multi View V2.5 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then signal read if rtresult = 2 then signal copy if rtresult = 3 then signal move if rtresult = 4 then signal delete if rtresult = 5 then signal about if rtresult = 0 then exit end read: address Command 'SYS:Utilities/multiview SCREEN' file exit end /* ----------------------------------------------------------------------- */ EXE: cuthere=lastpos('/',file) if cuthere=0 then cuthere=pos(':',file) exename="'"substr(file,cuthere+1)"'" if exists('T:FILE_ID.DIZ')then address command 'delete T:FILE_ID.DIZ quiet' ADDRESS command 'EXEDescript x > NIL: T:FILE_ID.DIZ '||File if ~exists('T:FILE_ID.DIZ')then signal ContEx Showme="" call open('FileID','T:FILE_ID.diz','r') do until eof('FileID') Showme=Showme||lf||readln('FileID') end Contex: rtezrequest(" " showme " ","_Copy|_Move|_Delete|_About|_Next","Multi View V2.5 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 2 then signal copy if rtresult = 3 then signal move if rtresult = 4 then signal delete if rtresult = 5 then signal about if rtresult = 0 then exit end Copy: Dirname = rtfilerequest(, , "Please Pick A Directory",,, "rtfi_flags = freqf_nofiles rtfi_initialpath=Ram:T/ RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) if rtresult == 0 then signal fail else address command 'Copy' file 'to' dirname call rtezrequest("The File Has Now Been Copied To" dirname, "_Ok", ,"RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) exit end Check: if upper(right(Reg,1))~='E' then signal fake if upper(left(Reg,1))~='D' then signal fake signal main end fake: rtezrequest("Im Sorry " lf " " lf "But This Version Is Not Registered To You." lf " " lf " This Should Be Registerd To 'DIVINE'" , "_Exit","Unregistered Version" ,"RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) end Move: Dirname = rtfilerequest(, , "Please Pick A Directory",,, "rtfi_flags = freqf_nofiles rtfi_initialpath=Ram:T/ RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) if rtresult == 0 then signal fail else address command 'move' file 'to' dirname call rtezrequest("The File Has Now Been Moved To" dirname, "_k", ,"RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) exit end Delete: rtezrequest(" Are You Sure ","_Yes|_Cancel","Deleting File ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if rtresult = 1 then address command 'Delete 'file exit end Fail: call rtezrequest("You Failed To Pick A Destination Directory.", "_Exit", ,"RT_ReqPos=ReqPos_CenterScr rt_PubScrName = "DOPUS.1) exit end About: call close('FileID') Call rtezrequest("Multi View & Extract For Dopus 5 By Pink Floyd Of Divine." lf " " lf "This Is The Unregistered Evaluation Copy" lf " " lf " If You Wish To Get The Latest Registered Version " lf " " lf " Then Call One Of The Many Divine Sites Through Out The World " lf " " lf " And Leave A Message To Me Pink Floyd.","_Quit|_Exit","Multi View & Extract V2.5 ©95 By Pink Floyd Of Divine ", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="DOPUS.1) if RTResult = 1 then signal start if rtresult = 0 then signal start end /* Eh Up Big In It */