home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 14 / AACD14.ISO / CDTools / S / AAShowDir < prev    next >
Text File  |  2000-06-02  |  1KB  |  51 lines

  1. /*
  2.     $VER: AAShowDir 1.6 (2.6.00) (c) Neil Bothwick, Wirenet
  3.     Open a Workbench Window/Lister using either OS 3.5 or Directory Opus
  4. */
  5.  
  6. options results
  7. address command
  8. call addlib('rexxsupport.library',0,-30,0)
  9. call addlib('rexxdossupport.library',0,-30,0)
  10. parse arg path
  11. if word(statef(path),1) = 'FILE' then path = PathPart(path)
  12.  
  13. select
  14.     when show('P','WORKBENCH') then OS = '3.5'
  15.     when show('P','SCALOS') then OS = 'Scalos'
  16.     when show('P','DOPUS.1') then do
  17.         address 'DOPUS.1' 'dopus version'
  18.         vers = translate(result,'.',' ')
  19.         select
  20.             when vers >= 5.8 then OS = 'MagII'
  21.             when vers >= 5.5 then OS = 'Opus'
  22.             otherwise OS = '3'
  23.             end
  24.         end
  25.     otherwise OS = '3'
  26.     end
  27.  
  28. select
  29.     when  OS = 'MagII' then do
  30.         address 'DOPUS.1'
  31.         if exists(path'.info') then 'lister new fromicon' path
  32.         else 'lister new' path
  33.         end
  34.     when OS = 'Opus' then address 'DOPUS.1' 'lister new' path
  35.     when OS = '3.5' then address 'WORKBENCH' 'WINDOW "'path'" OPEN'
  36.     when OS = 'Scalos' then do
  37.         if ~exists('SCALOS:Tools/opendrawer') then call ExitMsg('Unable to find SCALOS:Tools/opendrawer*NPlease check your Scalos installation')
  38.         else 'SCALOS:Tools/opendrawer "'path'"'
  39.         end
  40.     otherwise call ExitMsg('This feature only works if you are running*Na Directory Opus or Scalos Workbench,*Nor you have OS 3.5. You will have to open*Nthe window from its Workbench icon at:*N*N'path)
  41.     end
  42.  
  43. exit
  44.  
  45. ExitMsg: procedure
  46.     parse arg msg
  47.     'RequestChoice >NIL: "Amiga Active CD" "'msg'" "I See"'
  48.     exit
  49.  
  50.  
  51.