home *** CD-ROM | disk | FTP | other *** search
/ ANews 1 / AnewsCD01.iso / Script / ecoute.rexx < prev    next >
OS/2 REXX Batch file  |  1999-08-13  |  654b  |  38 lines

  1. /* Script Action Ecoute */
  2.  
  3. options results
  4.  
  5. parse arg type exe '"' filename '"'
  6.  
  7. type=upper(type)
  8.  
  9. /* Selection du type de player */
  10.  
  11. if type="SONGPLAYER" then call SP
  12. if type="AMPLIFIER" then call AMP
  13. exit
  14.  
  15. SP:
  16. if ~show('p','SONGPLAYER.1') then do
  17.   address command "run >NIL: "||exe||" GUI"
  18.   address command "waitforport SONGPLAYER.1"
  19. end
  20. if show('p','SONGPLAYER.1') then do
  21.   address SONGPLAYER.1
  22.   ADD '"'filename'"'
  23.   PLAY
  24. end
  25. exit
  26.  
  27. AMP:
  28. if ~show('p','AMPLIFIER.1') then do
  29.   address command "run >NIL: "||exe
  30.   address command "waitforport AMPLIFIER.1"
  31. end
  32. if show('p','AMPLIFIER.1') then do
  33.   address AMPLIFIER.1
  34.   PLAY '"'filename'"'
  35. end
  36. exit
  37.  
  38.