home *** CD-ROM | disk | FTP | other *** search
/ Audio 4.94 - Over 11,000 Files / audio-11000.iso / msdos / sndbords / proaudio / pcmtools / pcmtools.arj / LOADPCM.ARJ / PLAYKEY.BAT < prev    next >
DOS Batch File  |  1992-09-01  |  851b  |  46 lines

  1. @echo off
  2. if "%debug%" == "yes" echo on
  3.  
  4.     :: check the status of pcm
  5.     :: error if not available
  6.  
  7.     loadpcm s > nul
  8.     if errorlevel 1     goto notthere
  9.  
  10.     :: check syntax
  11.  
  12.     if "%1" == ""        goto syntax
  13.  
  14.     :: stat the specified sound number
  15.     :: if 255 is returned, the number is out of range
  16.     :: if the errorlevel == the sound number, play the sound
  17.     :: then quit
  18.  
  19.     loadpcm %1 > nul
  20.     if errorlevel 255    goto badnumber
  21.     if errorlevel %1    key%1
  22.     goto quit
  23.  
  24.     :: pcm has not been installed or xms memory is not present
  25.  
  26.     :notthere
  27.     echo PCM is not available
  28.     goto quit
  29.  
  30.     :: the user did not specify a sound number to play
  31.  
  32.     :syntax
  33.     echo Syntax: playkey #, where # is from 1 to 8
  34.     goto quit
  35.  
  36.     :: the user supplied a sound number out of range
  37.  
  38.     :badnumber
  39.     echo error: the number must be from 1 to 8
  40.     goto quit
  41.  
  42.     :quit
  43.     
  44.     
  45.  
  46.