home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / rexx / archandler.ro < prev    next >
Text File  |  1995-05-12  |  677b  |  38 lines

  1. /* 
  2.  
  3.    $VER: ArcHandler.RO 0.3
  4.  
  5.    Author:
  6.     Oliver Rummeyer (oliver.rummeyer@student.uni-ulm.de)
  7.  
  8.    Function:
  9.     Loads the ArcHandler equivalent directory of the active directory.
  10.  
  11.    Requires:
  12.     RO 0.90 or newer
  13.  
  14.    Example:
  15.      CUSTOMTYPE "#?.lha" "" "LHA/LZH Archive" "Rx >NIL: REXX:ArcHandler.RO %N %a"
  16.  
  17. */
  18.  
  19. PARSE ARG FileName PortName
  20.  
  21. IF PortName="" THEN
  22.  PortName='RO.1'
  23. ELSE
  24.  PortName=STRIP(PortName)
  25.  
  26. ADDRESS VALUE PortName
  27. OPTIONS RESULTS
  28.  
  29. 'Path Active'
  30. IF RESULT="RESULT" THEN
  31.   EXIT 5
  32. SourceDir=RESULT
  33.  
  34. Position=POS(":",SourceDir)
  35. Directory='ARC:'||SUBSTR(SourceDir,1,Position-1)||'/'SUBSTR(SourceDir,Position+1)
  36.  
  37. 'Load Active "'||Directory||FileName||'"'
  38.