Function Reference


SoundPlay

Play a sound file.

SoundPlay ( "filename" [, wait] )

Parameters

filename Name of the file to be played (typically a WAV or MP3)
wait [optional] This flag determines if the script should wait for the sound to finish before continuing:
1 = wait until sound has finished
0 = continue script while sound is playing (default)

Return Value

None. (Always returns 1 regardless of success.)

Remarks

Terminating the script will stop the sound (if it is still playing).
Calling SoundPlay("") can be used to stop a currently playing sound. This has the side effect of also closing the open handle.
If you need to delete a sound file which you have played in the script, you should call SoundPlay("") first to ensure the handle is closed.

Related

SoundSetWaveVolume, Beep

Example


SoundPlay(@WindowsDir & "\media\tada.wav", 1)