home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / misc / SP_ProjectMan.lha / sp-projectman / Rexx / edit.sman next >
Encoding:
Text File  |  1996-12-26  |  1.2 KB  |  43 lines

  1. /*
  2.  - Edit.sman
  3.  -
  4.  - ARexx program to edit the content of a file.
  5.  - The editor tool depends of the file extension.
  6.  - The tool is launched asynchronously.
  7.  -
  8.  - © Copyright 1995-1996 Bernard Krummenacher Silicon-Peace
  9.  -
  10.  - Bernard Krummenacher    Silicon-Peace 95.04.11    Created this file.
  11.  - Bernard Krummenacher    Silicon-Peace 96.08.14    Tried to make it usable with almost any Amiga..
  12. */
  13.  
  14. parse arg FileName '.' Extension
  15.  
  16. options results
  17.  
  18. if (UPPER(Extension) = 'MUIB') then
  19.   address COMMAND 'mui:muibuilder/muibuilder ' FileName'.'Extension
  20. else
  21.   if (((lastpos('SCOPTIONS',upper(FileName)) + 8) = length(FileName)) & (Extension = '')) then
  22.     do
  23.       path = left(FileName,lastpos('/',FileName))
  24.       oldPath = pragma('Directory',path)
  25.       address COMMAND 'scopts'
  26.       pragma('Directory',oldPath)
  27.     end;
  28.   else
  29. /*
  30.     if (UPPER(Extension) = 'GUIDE') then
  31.       address COMMAND 'Appls:Outils/AmigaGuide/Heddley/Heddley ' FileName'.'Extension
  32.     else
  33. */
  34.       address COMMAND 'getenv editor'
  35.       Editor = results
  36.       say Editor FileName'.'Extension
  37.       if (Extension = '') then
  38.     address COMMAND Editor FileName
  39.       else
  40.     address COMMAND Editor FileName'.'Extension
  41.  
  42. return 0
  43.