home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma23.dms / ma23.adf / Filer / Rexx / Execute.filer < prev    next >
Text File  |  1994-01-14  |  822b  |  47 lines

  1. /* 
  2.  
  3.    $VER: Execute.filer 1.1 (14.01.94)
  4.  
  5.    Author:
  6.     Matthias Scheler (tron@lyssa.pb.owl.de)
  7.  
  8.    Function:
  9.     Opens a string requester, asks for a command and its args and then
  10.     executes the comand in the directory of the current directory listview.
  11.  
  12.     It's Filer's equivalent for the Workbench's "Execute" menu item.
  13.  
  14.    Call from Filer:
  15.     EXECUTE
  16.  
  17.    Example for "Filer.RC":
  18.     BUTTON ...,...,"Execute","EXECUTE"
  19.  
  20. */
  21.  
  22. ADDRESS 'FilerRexx'
  23. OPTIONS RESULTS
  24.  
  25. 'STATUS Execute command'
  26. PANEL OFF
  27.  
  28. Command=GETCLIP('FILER_COMMAND')
  29. 'SETSTRING' Command
  30.  
  31. GETSTRING 'Enter command and args:'
  32. IF RESULT="RESULT" THEN
  33.  DO
  34.   PANEL ON
  35.   'STATUS Execution aborted'
  36.   EXIT 5
  37.  END
  38.  
  39. Command=RESULT
  40. SETCLIP('FILER_COMMAND',Command)
  41.  
  42. 'EXECANDWAIT' Command
  43. UPDATESOURCEDIR
  44.  
  45. PANEL ON
  46. 'HISTORY Command "'||Command||'" executed.'
  47.