home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / SSNDREXX.ZIP / SSNDREXX.CMD < prev    next >
OS/2 REXX Batch file  |  1993-04-27  |  864b  |  51 lines

  1. /* REXX */
  2.  
  3. /**
  4. *
  5. * Note:  PMREXX must be used.
  6. *
  7. **/
  8.  
  9. say 'BocaSoft System Sounds PMREXX Interface'
  10.  
  11.  
  12. /* Add the routine "FindSystemSounds" from our DLL "SSNDREXX" */
  13.  
  14. call rxfuncadd 'FindSystemSounds', 'SSNDREXX', 'FindSystemSounds'
  15.  
  16.  
  17. /* Add the routine "PlaySound" from our DLL "SSNDREXX" */
  18.  
  19. call rxfuncadd 'PlaySound', 'SSNDREXX', 'PlaySound'
  20.  
  21. /* Call DLL to locate System Sounds. Print any errors. */
  22.  
  23. call FindSystemSounds 
  24.  
  25. if (result > 0) then do
  26.  
  27.     select
  28.  
  29.     when (result = 1) then
  30.         say 'Error #' result ' - Not a Valid PM Session'
  31.     when (result = 2) then
  32.         say 'Error #' result ' - System Sounds Not Found'
  33.     otherwise
  34.         say 'Error #' result ' - Unknown Error Code'
  35.     exit
  36.  
  37.     end
  38. end
  39.  
  40. /* Loop forever accepting input and calling System Sounds */
  41.  
  42. do while 1
  43.  
  44.     index = linein()
  45.  
  46.     call PlaySound index
  47.  
  48. end
  49.  
  50.  
  51.