home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / cdtools / fileshow.standalone < prev    next >
Text File  |  1995-10-23  |  17KB  |  586 lines

  1. /* CD File READER V 1.0 1995 */
  2.  
  3. /* ------------------------------------------------------------- */
  4.  
  5. CDFileShowVersion="$VER: CDFileShow 1.0 (01-10-95)"
  6.  
  7. /* ------------------------------------------------------------- */
  8.  
  9. PORT=''
  10. signal on syntax
  11. options results
  12.  
  13. /* ------------------------------------------------------------- */
  14.  
  15. IF ~ SHOW('L', "rexxsupport.library") THEN DO
  16.   addlib("CDTools:rexxsupport.library",0,-30,0)
  17. END
  18.  
  19. IF ~ SHOW('L', "rexxreqtools.library") THEN DO
  20.   addlib("CDTools:rexxreqtools.library",0,-30)
  21. END
  22.  
  23. IF ~ SHOW('L', "rexxarplib.library") THEN DO
  24.   addlib("CDTools:rexxarplib.library",0,-30,0)
  25. END
  26.  
  27. /* ------------------------------------------------------------- */
  28.  
  29. /*
  30.     Here we get the file name from the command line
  31. */
  32.  
  33. arg filename
  34.  
  35. /*
  36.     And then we extract the file extension
  37. */
  38.  
  39. ext=''
  40. fname=''
  41. if lastpos(".",filename)~==0 then ext=right(filename,length(filename)-lastpos(".",filename),lastpos(".",filename))
  42. if lastpos("/",filename)~==0 then fname=right(filename,length(filename)-lastpos("/",filename),lastpos("/",filename))
  43. if fname=='' then
  44. do
  45.   if lastpos(":",filename)~==0 then fname=right(filename,length(filename)-lastpos(":",filename),lastpos(":",filename))
  46. end
  47.  
  48. if fname=='' then
  49. do
  50. fname=filename
  51. end
  52.  
  53. call Openfilelist
  54.  
  55. Showtext.v=""
  56.  
  57. /*
  58. ------------------------ Set font ----------------------------------
  59. */
  60.  
  61.  
  62. /*
  63.  -----------------------  Set up gadgets ---------------------------
  64. */
  65.  
  66.   select
  67.     when ext="LHA"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||ext
  68.     when ext="LZX"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||ext
  69.     when ext="DMS"   then Gadgets=SmallTitle||'|'||"COPY"||'|'||ext
  70.     when ext="LZH"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||ext
  71.     when ext="ZIP"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||ext
  72.  
  73.     when filename=='READ.ME' then Gadgets=Smalltitle||'|'||"COPY"||'|'||READ
  74.     when ext="DOC"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||READ
  75.     when ext="TXT"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||READ
  76.  
  77.     when ext="IFF"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||SHOW
  78.     when ext="GIF"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||SHOW
  79.     when ext="PIC"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||SHOW
  80.     when ext="JPG"   then Gadgets=Smalltitle||'|'||"COPY"||'|'||SHOW
  81.     when ext="JPEG"  then Gadgets=Smalltitle||'|'||"COPY"||'|'||SHOW
  82.  
  83.     when ext="GUIDE" then Gadgets=Smalltitle||'|'||"COPY"||'|'||VIEW
  84.  
  85.     otherwise Gadgets=Smalltitle||'|'||"COPY"||'|'||VIEW
  86.   end
  87.  
  88. /*
  89.  -----------------------  Get and show ID.Diz ---------------------------
  90. */
  91.  
  92.   call CheckAborting
  93.  
  94.   SelectedFile=TCTC||filename||TCTC
  95.   if exists('T:FILE_ID.DIZ')then address command 'delete T:FILE_ID.DIZ quiet'
  96.  
  97.     Showtext.v="No FILE_ID.DIZ"||newline||"For "filename
  98.     SELECT
  99.       WHEN ext='DMS' THEN ADDRESS command 'CDTools:dmsdescript > NIL: x T:FILE_ID.diz '||SelectedFile
  100.       WHEN ext='LHA' THEN ADDRESS command 'CDTools:lha x > NIL: '||SelectedFile||' FILE_ID.DIZ T:'
  101.       WHEN ext='LZX' THEN ADDRESS command 'CDTools:lzx x > NIL: '||SelectedFile||' FILE_ID.DIZ T:'
  102.       WHEN ext='LZH' THEN ADDRESS command 'CDTools:lha x > NIL: '||SelectedFile||' FILE_ID.DIZ T:'
  103.       WHEN ext='TXT' THEN ADDRESS command 'CDTools:TxtExtract e > NIL: T:FILE_ID.DIZ '||SelectedFile
  104.       WHEN ext='DOK' THEN ADDRESS command 'CDTools:TxtExtract e > NIL: T:FILE_ID.DIZ '||SelectedFile
  105.       WHEN ext='DOC' THEN ADDRESS command 'CDTools:TxtExtract e > NIL: T:FILE_ID.DIZ '||SelectedFile
  106.       WHEN ext='EXE' THEN ADDRESS command 'CDtools:EXEDescript x > NIL: T:FILE_ID.DIZ '||SelectedFile
  107.       WHEN ext='ZIP' THEN
  108.         do
  109.           olddirectory=pragma('D','T:')
  110.           ADDRESS command 'CDTools:Unzip > NIL: '||SelectedFile||'FILE_ID.DIZ '
  111.           pragma('D',olddirectory)
  112.         end
  113.       WHEN ext='GIF' THEN
  114.         do
  115.           olddirectory=pragma('D','T:')
  116.           ADDRESS command 'CDTools:Gifdesc e > NIL: '||SelectedFile||'FILE_ID.DIZ '
  117.           pragma('D',olddirectory)
  118.         end
  119.       OtherWise
  120.     END
  121.  
  122.     if exists('T:FILE_ID.DIZ')then
  123.     do
  124.     Showtext.v=""
  125.     call open('FileID','T:FILE_ID.diz','r')
  126.  
  127.     do until eof('FileID')
  128.       Showtext.v=Showtext.v||newline||readln('FileID')
  129.     end
  130.     call close('FileID')
  131.     end
  132.  
  133. /*
  134.  -----------------------  Report selected file ---------------------------
  135. */
  136.  
  137.   call writech CDFileShowWindow," "
  138.   call writech CDFileShowWindow,"Selected file -> "||filename
  139.   do t=length(filename)to 12
  140.     call writech CDFileShowWindow,' '
  141.   end
  142.  
  143. /*
  144.  -----------------------  Perform operation ---------------------------
  145. */
  146.  
  147.   call ChoiceWindow
  148.  
  149. exit
  150. end
  151.  
  152. /* ------------------------------------------------------------- */
  153.  
  154. ChoiceWindow:
  155.  
  156. if ext="EXE"|ext="DOC"|ext="TXT"|ext="IFF"|ext="JPG"|ext="JPEG"|ext="GIF"|ext="PIC"|ext="GUIDE" then
  157.  
  158.   call HandleImmediate
  159.  
  160. else do
  161.  
  162. fonttag = 'rt_font=topaz.font/8'
  163.  
  164. actieresult=rtezrequest(Showtext.v,Gadgets,"",fonttag TAG2,actieresult)
  165.  
  166. select
  167.   when actieresult=1 then call Nothing
  168.   when actieresult=2 then call Copying
  169.   when actieresult=0&ext="DMS" then call DMS
  170.   when actieresult=0&ext="LHA" then call LHA
  171.   when actieresult=0&ext="LZX" then call LZX
  172.   when actieresult=0&ext="LZH" then call LHA
  173.   when actieresult=0&ext="ZIP" then call ZIP
  174.   when actieresult=0&ext="DOC" then address command 'CDTools:PPMore '||filename
  175.   when actieresult=0&ext="DOK" then address command 'CDTools:PPMore '||filename
  176.   when actieresult=0&ext="TXT" then address command 'CDTools:PPMore '||filename
  177.   when actieresult=0&ext="IFF" then address command 'CDTools:VT '||filename
  178.   when actieresult=0&ext="GIF" then address command 'CDTools:VT '||filename
  179.   when actieresult=0&ext="PIC" then address command 'CDTools:VT '||filename
  180.   when actieresult=0&ext="JPG" then address command 'CDTools:VT '||filename
  181.   when actieresult=0&ext="JPEG" then address command 'CDTools:VT '||filename
  182.   when actieresult=0&ext="GUIDE" then address command 'CDTools:PPGuide '||filename
  183.   when actieresult=0 then call Other
  184. end
  185. end
  186. return
  187.  
  188. /* ------------------------------------------------------------- */
  189.  
  190. HandleImmediate:
  191.  
  192. select
  193.   when ext="EXE"   then address command 'run '||filename
  194.   when ext="DOC"   then address command 'CDTools:PPMore '||filename
  195.   when ext="DOK"   then address command 'CDTools:PPMore '||filename
  196.   when ext="TXT"   then address command 'CDTools:PPMore '||filename
  197.   when ext="IFF"   then address command 'CDTools:VT '||filename
  198.   when ext="GIF"   then address command 'CDTools:VT '||filename
  199.   when ext="PIC"   then address command 'CDTools:VT '||filename
  200.   when ext="JPG"   then address command 'CDTools:VT '||filename
  201.   when ext="JPEG"  then address command 'CDTools:VT '||filename
  202.   when ext="GUIDE" then address command 'CDTools:PPGuide '||filename
  203. end
  204. return
  205.  
  206. /* ------------------------------------------------------------- */
  207.  
  208. CheckAborting:
  209. checkabort
  210. if result=1 then do
  211.   beep
  212.   breakresult=rtezrequest("Exit Program ??","YES|NO","",TagL,breakresult)
  213.   if breakresult=1 then do
  214.     exit
  215.   end
  216. end
  217. return
  218.  
  219. /* ------------------------------------------------------------- */
  220.  
  221. OpenFilelist:
  222.  
  223. PubScr='WorkBench'
  224.  
  225. newline='a'x
  226. TCTC='"'
  227. Newshelltext="CON:100/60/440/61/CDFileShow/SCREEN"||PubScr
  228. Outputtext=" <NIL: >"||TCTC||"CON:20/65/625/141/CDFileShow/SCREEN"||PubScr||TCTC
  229.  
  230. call open CDFileShowWindow,Newshelltext
  231. if ~result then
  232. do
  233.   say "Open failed .... !!!!"
  234.   exit
  235. end
  236.  
  237. Tag0="rt_reqpos=reqpos_centerscr "
  238. TagL="rt_reqpos=reqpos_topleftscr rt_leftoffset=460 rt_topoffset=11 "
  239. TagR="rt_reqpos=reqpos_topleftscr rt_topoffset=11 "
  240. Tag2=Tag0||"rt_pubscrname="||PubScr
  241. Tag3=TagL||"rt_pubscrname="||PubScr
  242. Tag4=TagR||"rt_pubscrname="||PubScr
  243. SmallTitle=" SKIP"
  244.  
  245. return
  246.  
  247. /* ------------------------------------------------------------- */
  248.  
  249. syntax:
  250. if rc<49 then ErrorText="Syntax Error" rc"," errortext(rc)"in line" sigl"."
  251. if rc ~=2 then rtezrequest(Errortext,,"",Tag0)
  252. say errortext
  253. exit
  254.  
  255. /* ------------------------------------------------------------- */
  256.  
  257. SearchFilename:
  258. Showtext.w="No FILE_ID.DIZ"
  259. if SearchFile.w=list.z then
  260. do
  261.   s=z+1
  262.   Showtext.w=newline
  263.   Showtext.w=Showtext.w||list.x||newline
  264. end
  265. return
  266.  
  267. /* ------------------------------------------------------------- */
  268.  
  269. Nothing:
  270. call writeln CDFileShowWindow," >read file...ready<"
  271. return
  272.  
  273. /* ------------------------------------------------------------- */
  274.  
  275. Skipping:
  276. return
  277.  
  278. /* ------------------------------------------------------------- */
  279.  
  280. Copying:
  281.  
  282. call DirRequest
  283.  
  284. copytext="Copy "||filename||" to "||Directory||"....?"||newline
  285. copyGadgets="COPY to "||Directory||"|"Smalltitle
  286.  
  287. copresult=rtezrequest(copytext,copyGadgets,"",Tag2,copresult)
  288.  
  289. if copresult=1 then
  290. do
  291.   call writeln CDFileShowWindow," ->Copying to "||Directory
  292.   address command
  293.   'copy '||filename||' '||Directory
  294. end
  295.  
  296. if copresult=0 then call writeln CDFileShowWindow," --Didn't Copy or Move anything"
  297. return
  298.  
  299. /* ------------------------------------------------------------- */
  300.  
  301. DMS:
  302. dmstext="Where do YOU want DMS to ?"||newline||SelectedFile
  303. dmsGadgets="DF0|RAD|DF1|DF2|FF0|FF1|FF2|FF3|FF4|FF5|FF6|FF7|FF8|FF9|"Smalltitle
  304.  
  305. dmsresult=rtezrequest(dmstext,dmsGadgets,"",Tag2,dmsresult)
  306.  
  307. if dmsresult=1 then do
  308.   call writeln CDFileShowWindow," ->DMS to DF0:"
  309.   address command
  310.   'CDTools:dms write' SelectedFile "to DF0: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  311. end
  312.  
  313. if dmsresult=2 then do
  314.   call writeln CDFileShowWindow," ->DMS to RAD:"
  315.   address command
  316.   if SHOWLIST('H','RAD')
  317.   then call writeln CDFileShowWindow," RAD: already mounted"
  318.   else do
  319.     call writeln CDFileShowWindow," Mounting RAD:"
  320.     'mount RAD: from CDTools:FileShowRAD'
  321.   end
  322.   'CDTools:dms write' SelectedFile "to RAD: NOTEXT NOPAUSE"||Outputtext
  323.   ScanDirFlag="RAD:"
  324. end
  325.  
  326. if dmsresult=3 then do
  327.   call writeln CDFileShowWindow," ->DMS to DF1:"
  328.   address command
  329.   'CDTools:dms write' SelectedFile "to DF1: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  330. end
  331.  
  332. if dmsresult=4 then do
  333.   call writeln CDFileShowWindow," ->DMS to DF2:"
  334.   address command
  335.   'CDTools:dms write' SelectedFile "to DF2: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  336. end
  337.  
  338. if dmsresult=5 then do
  339.   call writeln CDFileShowWindow," ->DMS to FF0:"
  340.   address command
  341.   if SHOWLIST('H','FF0')
  342.   then call writeln CDFileShowWindow," FF0: already mounted"
  343.   else do
  344.     call writeln CDFileShowWindow," Mounting FF0:"
  345.     'mount FF0: FROM CDTools:FileShowFF0'
  346.   end
  347.   'CDTools:dms write' SelectedFile "to FF0: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  348.   ScanDirFlag="FF0:"
  349. end
  350.  
  351. if dmsresult=6 then do
  352.   call writeln CDFileShowWindow," ->DMS to FF1:"
  353.   address command
  354.   if SHOWLIST('H','FF1')
  355.   then call writeln CDFileShowWindow," FF1: already mounted"
  356.   else do
  357.     call writeln CDFileShowWindow," Mounting FF1:"
  358.     'mount FF1: FROM CDTools:FileShowFF1'
  359.   end
  360.   'CDTools:dms write' SelectedFile "to FF1: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  361.   ScanDirFlag="FF1:"
  362. end
  363.  
  364. if dmsresult=7 then do
  365.   call writeln CDFileShowWindow," ->DMS to FF2:"
  366.   address command
  367.   if SHOWLIST('H','FF2')
  368.   then call writeln CDFileShowWindow," FF2: already mounted"
  369.   else do
  370.     call writeln CDFileShowWindow," Mounting FF2:"
  371.     'mount FF2: FROM CDTools:FileShowFF2'
  372.   end
  373.   'CDTools:dms write' SelectedFile "to FF2: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  374.   ScanDirFlag="FF2:"
  375. end
  376.  
  377. if dmsresult=8 then do
  378.   call writeln CDFileShowWindow," ->DMS to FF3:"
  379.   address command
  380.   if SHOWLIST('H','FF3')
  381.   then call writeln CDFileShowWindow," FF3: already mounted"
  382.   else do
  383.     call writeln CDFileShowWindow," Mounting FF3:"
  384.     'mount FF3: FROM CDTools:FileShowFF3'
  385.   end
  386.   'CDTools:dms write' SelectedFile "to FF3: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  387.   ScanDirFlag="FF3:"
  388. end
  389.  
  390. if dmsresult=9 then do
  391.   call writeln CDFileShowWindow," ->DMS to FF4:"
  392.   address command
  393.   if SHOWLIST('H','FF4')
  394.   then call writeln CDFileShowWindow," FF4: already mounted"
  395.   else do
  396.     call writeln CDFileShowWindow," Mounting FF4:"
  397.     'mount FF4: FROM CDTools:FileShowFF4'
  398.   end
  399.   'CDTools:dms write' SelectedFile "to FF4: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  400.   ScanDirFlag="FF4:"
  401. end
  402.  
  403. if dmsresult=10 then do
  404.   call writeln CDFileShowWindow," ->DMS to FF5:"
  405.   address command
  406.   if SHOWLIST('H','FF5')
  407.   then call writeln CDFileShowWindow," FF5: already mounted"
  408.   else do
  409.     call writeln CDFileShowWindow," Mounting FF5:"
  410.     'mount FF5: FROM CDTools:FileShowFF5'
  411.   end
  412.   'CDTools:dms write' SelectedFile "to FF5: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  413.   ScanDirFlag="FF5:"
  414. end
  415.  
  416. if dmsresult=11 then do
  417.   call writeln CDFileShowWindow," ->DMS to FF6:"
  418.   address command
  419.   if SHOWLIST('H','FF6')
  420.   then call writeln CDFileShowWindow," FF6: already mounted"
  421.   else do
  422.     call writeln CDFileShowWindow," Mounting FF6:"
  423.     'mount FF6: FROM CDTools:FileShowFF6'
  424.   end
  425.   'CDTools:dms write' SelectedFile "to FF6: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  426.   ScanDirFlag="FF6:"
  427. end
  428.  
  429. if dmsresult=12 then do
  430.   call writeln CDFileShowWindow," ->DMS to FF7:"
  431.   address command
  432.   if SHOWLIST('H','FF7')
  433.   then call writeln CDFileShowWindow," FF7: already mounted"
  434.   else do
  435.     call writeln CDFileShowWindow," Mounting FF7:"
  436.     'mount FF7: FROM CDTools:FileShowFF7'
  437.   end
  438.   'CDTools:dms write' SelectedFile "to FF7: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  439.   ScanDirFlag="FF7:"
  440. end
  441.  
  442. if dmsresult=13 then do
  443.   call writeln CDFileShowWindow," ->DMS to FF8:"
  444.   address command
  445.   if SHOWLIST('H','FF8')
  446.   then call writeln CDFileShowWindow," FF8: already mounted"
  447.   else do
  448.     call writeln CDFileShowWindow," Mounting FF8:"
  449.     'mount FF8: FROM CDTools:FileShowFF8'
  450.   end
  451.   'CDTools:dms write' SelectedFile "to FF8: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  452.   ScanDirFlag="FF8:"
  453. end
  454.  
  455. if dmsresult=14 then do
  456.   call writeln CDFileShowWindow," ->DMS to FF9:"
  457.   address command
  458.   if SHOWLIST('H','FF9')
  459.   then call writeln CDFileShowWindow," FF9: already mounted"
  460.   else do
  461.     call writeln CDFileShowWindow," Mounting FF9:"
  462.     'mount FF9: FROM CDTools:FileShowFF9'
  463.   end
  464.   'CDTools:dms write' SelectedFile "to FF9: NOTEXT NOVERIFY NOPAUSE"||Outputtext
  465.   ScanDirFlag="FF9:"
  466. end
  467.  
  468. if dmsresult=0 then call writeln CDFileShowWindow," --Didn't Dms anything"
  469. if rc ~=0 then do
  470.   call writeln CDFileShowWindow," DMS ERROR  -> "||result
  471. end
  472.  
  473. return
  474.  
  475. /* ------------------------------------------------------------- */
  476.  
  477. LHA:
  478.  
  479. call DirRequest
  480. lhatext="Extract "ext" "||newline||SelectedFile
  481. lhaGadgets=ext||' to '||Directory"|"Smalltitle
  482.  
  483. lharesult=rtezrequest(lhatext,lhaGadgets,"",Tag2,lharesult)
  484. if lharesult=1 then do
  485.   call writeln CDFileShowWindow," "||ext||" to "||Directory
  486.   address command
  487.   'CDtools:lha e '||SelectedFile||' '||Directory||' '||Outputtext
  488. end
  489. if lharesult=0 then call writeln CDFileShowWindow," --Didn't "ext" anything"
  490. return
  491.  
  492. /* ------------------------------------------------------------- */
  493.  
  494. LZX:
  495.  
  496. call DirRequest
  497.  
  498. lzxtext="Extract "ext" "||newline||SelectedFile
  499. lzxGadgets=ext||' to '||Directory"|"Smalltitle
  500. lzxresult=rtezrequest(lzxtext,lzxGadgets,"",Tag2,lzxresult)
  501. if lzxresult=1 then do
  502.   call writeln CDFileShowWindow," "||ext||" to "||Directory
  503.   address command
  504.   'CDtools:lzx -x x '||SelectedFile||' '||Directory||' '||Outputtext
  505. end
  506. if lzxresult=0 then call writeln CDFileShowWindow," --Didn't "ext" anything"
  507. return
  508.  
  509. /* ------------------------------------------------------------- */
  510.  
  511. ZIP:
  512.  
  513. call DirRequest
  514.  
  515. ziptext="Extract "ext" "||newline||SelectedFile
  516. zipGadgets=ext||' to '||Directory"|"Smalltitle
  517. zipresult=rtezrequest(ziptext,zipGadgets,"",Tag2,zipresult)
  518. if zipresult=1 then do
  519.   call writeln CDFileShowWindow," "||ext||" to "||Directory
  520.   address command
  521.   olddirectory=pragma('D','RAM:')
  522.   'CDtools:unzip '||SelectedFile||' '||Directory||' '||Outputtext
  523.   address
  524.   pragma('D',olddirectory)
  525.   ScanDirFlag="RAM:"
  526. end
  527. if zipresult=0 then call writeln CDFileShowWindow," --Didn't "ext" anything"
  528. return
  529.  
  530. /* ------------------------------------------------------------- */
  531.  
  532. MySetFont:
  533.  
  534. myfont.Name = 'topaz.font'
  535. myfont.Size = 8
  536. myfont.XSize = 8
  537. myfont.Style = 0
  538. myfont.Flags = 0
  539.  
  540.  
  541. myport.Name = address()
  542.  
  543.  
  544. pig=SetFont(myport.Name,myfont.Name,myfont.Size,myfont.Style,myfont.Flags,myfont.XSize)
  545.  
  546. return
  547.  
  548. /* --------------------------------------------------------------*/
  549.  
  550. DirRequest:
  551.  
  552.  Directory=TCTC||getfile(50,50,,,"Please select destination directory","Workbench",NOFILES)||TCTC
  553.  
  554. return
  555.  
  556. /* ------------------------------------------------------------- */
  557.  
  558. FileRequest:
  559.  
  560.  File=TCTC||getfile(50,50,,,"Please select file")||TCTC
  561.  
  562. return
  563.  
  564. /* ------------------------------------------------------------- */
  565.  
  566. Other:
  567.  
  568. othertext="PLEASE SELECT:"||newline||SelectedFile
  569. otherGadgets="READ IT|EXECUTE|"BACK
  570. othresult=rtezrequest(othertext,otherGadgets,"",Tag2,othresult)
  571. if othresult=1 then do
  572.   call writeln CDFileShowWindow," ->Read the file "
  573.   address command
  574.   'CDTools:PPMore '||filename
  575. end
  576. if othresult=2 then do
  577.   call writeln CDFileShowWindow," ->Executing the file "
  578.   address command
  579.   'execute '||filename
  580. end
  581. if othresult=0 then call writeln CDFileShowWindow," --Didn't know what to do with"
  582. return
  583.  
  584. /* End --------------------------------------------------------- */
  585.  
  586.