/* FileID_DIZ READER V 2.0 ® TGI-SOFT 1994 */ FileShowVersion="$VER: FileShow 2.0 (08-10-94)" PORT='' signal on syntax 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) ScanDirFlag="" Zet=RAM Dos=DEST status 3 window=result status 9 window entries=result if entries=0 then do beep rtezrequest(Nothing selected !!!.) exit end call Openfilelist RescanFlag=0 do v=1 to aantal SearchFile=SearchFile.v File=SearchFile.v Archtype=right(SearchFile.v,3) call CheckAbortus select when Archtype="LHA" then Gadgets=Smalltitle||'|'||"COPY"||'|'||Archtype||'|'||"DEL" when Archtype="DMS" then Gadgets=SmallTitle||'|'||"COPY"||'|'||Archtype||'|'||"DEL" when Archtype="LZH" then Gadgets=Smalltitle||'|'||"COPY"||'|'||Archtype||'|'||"DEL" when Archtype="ZIP" then Gadgets=Smalltitle||'|'||"COPY"||'|'||Archtype||'|'||"DEL" otherwise Gadgets="GO BACK"||'|'||"COPY"||'|'Archtype'|'||"DEL" end SelectedFile=TCTC||PathFile||File||TCTC if exists('T:FILE_ID.DIZ')then address command 'delete T:FILE_ID.DIZ quiet' if Showtext.v="No FILE_ID.DIZ" then do Showtext.v="No FILE_ID.DIZ"||newline||"For "File SELECT WHEN ArchType='DMS' THEN ADDRESS command 'dmsdescript > NIL: x T:FILE_ID.diz '||SelectedFile WHEN ArchType='LHA' THEN ADDRESS command 'lha x > NIL: '||SelectedFile||' FILE_ID.DIZ T:' WHEN ArchType='LZH' THEN ADDRESS command 'lha x > NIL: '||SelectedFile||' FILE_ID.DIZ T:' WHEN ArchType='TXT' THEN ADDRESS command 'TxtExtract e > NIL: T:FILE_ID.DIZ '||SelectedFile WHEN ArchType='DOK' THEN ADDRESS command 'TxtExtract e > NIL: T:FILE_ID.DIZ '||SelectedFile WHEN ArchType='DOC' THEN ADDRESS command 'TxtExtract e > NIL: T:FILE_ID.DIZ '||SelectedFile WHEN ArchType='EXE' THEN ADDRESS command 'EXEDescript x > NIL: T:FILE_ID.DIZ '||SelectedFile WHEN ArchType='ZIP' THEN do olddirectory=pragma('D','T:') ADDRESS command 'Unzip > NIL: '||SelectedFile||'FILE_ID.DIZ ' pragma('D',olddirectory) end WHEN ArchType='GIF' THEN do olddirectory=pragma('D','T:') ADDRESS command 'Gifdesc e > NIL: '||SelectedFile||'FILE_ID.DIZ ' pragma('D',olddirectory) end OtherWise break END if ~exists('T:FILE_ID.DIZ')then break Showtext.v="" call open('FileID','T:FILE_ID.diz','r') do until eof('FileID') Showtext.v=Showtext.v||newline||readln('FileID') end call close('FileID') end if v<10 then call writech FileShowWindow," " call writech FileShowWindow,v||"->"||SearchFile.v do t=length(SearchFile.v)to 12 call writech fileShowWindow,' ' end call ChoiceWindow address(port) if Window=0&ScanDirFlag ~="" then scandir ScanDirFlag ' 0' if Window=1&ScanDirFlag ~="" then scandir ScanDirFlag ' 1' if RescanFlag=5 then do rescan RescanFlag=0 end end address(port) modify dirflags olddirflags exit end ChoiceWindow: if Window=0 then actieresult=rtezrequest(Showtext.v,Gadgets,"",Tag3,actieresult) else actieresult=rtezrequest(Showtext.v,Gadgets,"",Tag4,actieresult) select when actieresult=1 then call Nothing when actieresult=2 then call Copying when actieresult=3&Archtype="DMS" then call DMS when actieresult=3&Archtype="LHA" then call LHA when actieresult=3&Archtype="LZH" then call LHA when actieresult=3&Archtype="ZIP" then call ZIP when actieresult=3 then call Other when actieresult=0 then call Deleting end return CheckAbortus: checkabort if result=1 then do beep breakresult=rtezrequest("Exit Program ??","YES|NO","",TagL,breakresult) if breakresult=1 then do exit end end return OpenFilelist: newline='a'x TCTC='"' if port='' then port=DOPUS.1 Newshelltext="CON:220/240/450/61/FileShow V 2.0 ® TGI/SCREEN"||port Outputtext=" >"||TCTC||"CON:20/65/625/141/® TGI/SCREEN"||port||TCTC call open FileShowWindow,Newshelltext if ~result then do say "Open failed .... !!!!" exit end Tag0="rt_reqpos=reqpos_centerscr " TagL="rt_reqpos=reqpos_topleftscr rt_leftoffset=460 rt_topoffset=11 " TagR="rt_reqpos=reqpos_topleftscr rt_topoffset=11 " Tag2=Tag0||"rt_pubscrname="||port Tag3=TagL||"rt_pubscrname="||port Tag4=TagR||"rt_pubscrname="||port SmallTitle="NEXT" address(port) status 9 window entries=result filename="" v=1 do entries getnextselected SearchFile.v=result selectfile SearchFile.v 0 1 v=v+1 end v=v-1 none 'status 13 -1' PathFile=result call CheckAbortus query dirflags olddirflags=result Aantal=v call writeln FileShowWindow,"Found> "||Aantal||" files in Dir ..."||PathFile||"" do w=1 to aantal SearchFile.w=Upper(SearchFile.w) call SearchFilename end return syntax: if rc<49 then ErrorText="Syntax Error" rc"," errortext(rc)"in line" sigl"." if rc ~=2 then rtezrequest(Errortext,,"",Tag0) say errortext exit SearchFilename: Showtext.w="No FILE_ID.DIZ" if SearchFile.w=list.z then do s=z+1 Showtext.w=newline Showtext.w=Showtext.w||list.x||newline end return Nothing: call writeln FileShowWindow," >read file...ready<" return Deleting: deletetext="Are YOU sure YOU want delete"||newline||SelectedFile deleteGadgets="DELETE IT|NEXT" if Window=0 then delresult=rtezrequest(deletetext,deleteGadgets,"",Tag3,delresult) else delresult=rtezrequest(deletetext,deleteGadgets,"",Tag4,delresult) if delresult=1 then do call writeln FileShowWindow," ->deleted " address command delete SelectedFile quiet address(port) modify dirflags olddirflags rescan RescanFlag=RescanFlag+1 end else call writeln FileShowWindow," --Didn't delete " return Copying: copytext="Where do YOU want copy to ?"||newline||SelectedFile copyGadgets="COPY "Zet"|COPY "Dos"|MOVE "Zet"|MOVE "Dos"|"Smalltitle if Window=0 then copresult=rtezrequest(copytext,copyGadgets,"",Tag3,copresult) else copresult=rtezrequest(copytext,copyGadgets,"",Tag4,copresult) if copresult=1 then do call writeln FileShowWindow," ->Copying to "||Zet address(port) 'copy' File Zet":" end if copresult=2 then do call writeln FileShowWindow," ->Copying to "||Dos address(port) 'copy' File Dos":" end if copresult=3 then do call writeln FileShowWindow," ->Moving to "||Zet address(port) 'move' File Zet":" RescanFlag=RescanFlag+1 end if copresult=4 then do call writeln FileShowWindow," ->Moving to "||Dos address(port) 'move' File Dos":" RescanFlag=RescanFlag+1 end if copresult=0 then call writeln FileShowWindow," --Didn't Copy or Move anything" return DMS: dmstext="Where do YOU want DMS to ?"||newline||SelectedFile dmsGadgets="DMS DF0:|DMS RAD:|DMS DF1:|DMS DF2:|"Smalltitle if Window=0 then dmsresult=rtezrequest(dmstext,dmsGadgets,"",Tag3,dmsresult) else dmsresult=rtezrequest(dmstext,dmsGadgets,"",Tag4,dmsresult) if dmsresult=1 then do call writeln FileShowWindow," ->DMS to DF0:" address command 'dms write' SelectedFile "to DF0: NOTEXT NOVERIFY NOPAUSE"||Outputtext end if dmsresult=2 then do call writeln FileShowWindow," ->DMS to RAD:" address command if showlist('H','RAD') then call writeln FileShowWindow," RAD: already mounted" else do call writeln FileShowWindow," Mounting RAD:" 'mount RAD: from REXX:FileShowRAD' end 'dms write' SelectedFile "to RAD: NOTEXT NOPAUSE"||Outputtext ScanDirFlag="RAD:" end if dmsresult=3 then do call writeln FileShowWindow," ->DMS to DF1:" address command 'dms write' SelectedFile "to DF1: NOTEXT NOVERIFY NOPAUSE"||Outputtext end if dmsresult=4 then do call writeln FileShowWindow," ->DMS to DF2:" address command 'dms write' SelectedFile "to DF2: NOTEXT NOVERIFY NOPAUSE"||Outputtext end if dmsresult=0 then call writeln FileShowWindow," --Didn't Dms anything" if rc ~=0 then do call writeln FileShowWindow," DMS ERROR -> "||result end return LHA: lhatext="Extract "ArchType" "||newline||SelectedFile lhaGadgets=ArchType" RAM|"Smalltitle if Window=0 then lharesult=rtezrequest(lhatext,lhaGadgets,"",Tag3,lharesult) else lharesult=rtezrequest(lhatext,lhaGadgets,"",Tag4,lharesult) if lharesult=1 then do call writeln FileShowWindow," ->"ArchType||" to RAM:" address command 'lha e ' SelectedFile "RAM:"||Outputtext end if lharesult=0 then call writeln FileShowWindow," --Didn't "ArchType" anything" return ZIP: ziptext="Extract "ArchType" "||newline||SelectedFile zipGadgets=ArchType" RAM|"Smalltitle if Window=0 then zipresult=rtezrequest(ziptext,zipGadgets,"",Tag3,zipresult) else zipresult=rtezrequest(ziptext,zipGadgets,"",Tag4,zipresult) if zipresult=1 then do call writeln FileShowWindow," ->"ArchType||" to RAM:" address command olddirectory=pragma('D','RAM:') 'unzip ' SelectedFile||' '||Outputtext address pragma('D',olddirectory) ScanDirFlag="RAM:" end if zipresult=0 then call writeln FileShowWindow," --Didn't "ArchType" anything" return Other: othertext="PLEASE SELECT:"||newline||SelectedFile otherGadgets="READ IT|EXECUTE|"BACK if Window=0 then othresult=rtezrequest(othertext,otherGadgets,"",Tag3,othresult) else othresult=rtezrequest(othertext,otherGadgets,"",Tag4,othresult) if othresult=1 then do call writeln FileShowWindow," ->Read the file " address(port) 'read' File busy off RescanFlag=RescanFlag+1 end if othresult=2 then do call writeln FileShowWindow," ->Executing the file " address(port) 'execute' File end if othresult=0 then call writeln FileShowWindow," --Didn't know what to do with" return