home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 569a.lha / EdPlayer_REXX / EdP.rexx < prev    next >
OS/2 REXX Batch file  |  1991-08-11  |  2KB  |  64 lines

  1. /* ARexx example for EdPlayer, by Ed Mackey */
  2.  
  3. /*
  4.    This is in case you can't use the kd_freq.library.  I have gotten
  5.    one report that kd_freq does NOT work under 2.0!  This shouldn't be
  6.    true!  Kd_freq was DESIGNED for 2.0!!  Can anyone else with 2.0
  7.    please tell me if it runs on your machine or not??
  8.  
  9.    If not, use this script, by typing "rx EdP" from CLI while this
  10.    script ("EdP.rexx") is in your REXX: directory and ARexx is running.
  11.    Also you can provide a path: "rx EdP <pathname>" such as:
  12.  
  13.    Example:  rx EdP dh0:music/modules
  14.  
  15.    If there are more problems with kd_freq, I will make a more permemnant
  16.    solution than this.  But only if I REALLY have to.
  17.  
  18.    You cannot multiple-select with the ARP file requester.
  19.    FOR USE WITH EdPlayer PROGRAMS:  See end of script...
  20. */
  21.  
  22. /**************************************************************************/
  23.  
  24. arg pathn  /* This gets the path from the cli args */
  25.  
  26. /* You need the rexxarplib.library in LIBS: if you want to use the ARP
  27.    library from ARexx.  You ALSO need the screenshare.library in LIBS: if
  28.    you want to use the rexxarplib.library.  The following tells ARexx it's
  29.    going to need these libraries: */
  30. check = addlib('rexxarplib.library',0,-30,0)
  31.  
  32. address 'EDPLAYER'   /* Hmm, what does this do? */
  33.  
  34. /* The following makes a default MOD directory for when none is
  35.    explicitly provided.  You can change this to your favorite dir */
  36.  
  37. if pathn = '' then pathn = 'ST-00:modules'
  38.  
  39. /* The following makes the ARP file requester appear! */
  40.  
  41. filenam = getfile(150,0,pathn,,'Select NT or MED module:')
  42. /* If you get an "unknown function" error on the above line, check that
  43.    your LIBS: directory has rexxarplib.library, screenshare.library, and
  44.    arp.library. */
  45.  
  46. /* What if user presses CANCEL?  Do this: */
  47.  
  48. if filenam = "" then
  49.   do
  50.     say 'No filename entered!'
  51.   end
  52. else    /* OTHERWISE, you have a path & filename, so PLAY it! */
  53.   do
  54.     say 'Now playing: '||filenam      /* Tell user what's up */
  55.     'PLAY '||filenam                  /* Tell EdPlayer too, why not */
  56.   end              /* For this script to work with EdPlayer PROGRAMS,
  57.                       change the PLAY to JUKE in the above line.
  58.                       PLAY and JUKE are EdPlayer commands.  For a
  59.                       complete list of these commands, see EdPlayer.DOC */
  60.  
  61. /* I think that about does it. */
  62.  
  63. exit
  64.