Plays a WAV sound file.
PlayWaveForm (filename, mode)
(s) filename name of the WAV sound file.
(i) mode play mode (see below).
(i) @TRUE if successful; @FALSE if unsuccessful.
If Windows multimedia sound extensions are present, and waveform-compatible hardware is installed, this function will play a WAV sound file. If "filename" is not in the current directory and a directory is not specified, the path will be searched to find the file. If "filename" is not found, the WAV file associated with the "SystemDefault" keyword is played, (unless the "NoDefault" setting is on).
Instead of specifying an actual filename, you may specify a keyword name from the [Sound] section of the WIN.INI file (e.g., "SystemStart"), or equivalent Registry key, in which case the WAV file associated with that keyword name will be played.
"Mode" is a bitmask, composed of the following bits:
|
You can combine these bits using the binary OR operator.
The command PlayWaveForm(" ", 0) can be used at any time to stop sound.
PlayWaveform("tada.wav", 0) PlayWaveform("SystemDefault", 1 | 16) Message("PlayWaveForm","Done.")