home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / m / midiplayv2.58.lha / MidiPlay / ARexx / playonemidi.rexx < prev   
OS/2 REXX Batch file  |  1994-08-07  |  950b  |  51 lines

  1. /*
  2.     This script by Erno Tuomainen
  3.  
  4.     NOTE!!!!!
  5.  
  6.     BTW, if you don't specify PATH in the argument then script will
  7.              search the path specified in 'DEFPATH':
  8.  
  9.     Make a normal Dos-script called PLAY then issue a command:
  10.  
  11.     protect PLAY +s
  12.  
  13.     PLAY should contain following :
  14.  
  15.     ---CUT HERE---
  16.     .key filename/a
  17.     .bra {
  18.     .ket }
  19.  
  20.     sys:rexxc/rx rexx:PlayOneMIDI.REXX {filename}
  21.     ---CUT HERE---
  22.  
  23.     P.S. This script will load MIDIPLAY into memory if not already there.
  24.         (Edit the variable 'MPath' for your system.
  25.  
  26. */
  27.  
  28. DEFPATH = 'GMIDI:'            /* Where you keep your MIDIfiles */
  29. MPath = 'sys:utilities'
  30.  
  31. OPTIONS RESULTS
  32. arg filename
  33. address command
  34.  
  35. if ~show('p',"MidiPlay_rexx") then
  36.   'run <>NIL: 'MPath
  37.  
  38. if pos(':', filename) = 0 & pos('/', filename) = 0 then
  39.     filename = DEFPATH || filename
  40.  
  41. Checkloop1:
  42.     result = SHOW("p","MidiPlay_rexx")
  43.     if result=0 then signal Checkloop1
  44.  
  45. ADDRESS "MidiPlay_rexx"
  46. 'SETLOOP OFF'
  47. 'SETEXIT ON'
  48. 'LOAD 'filename
  49.  
  50. EXIT
  51.