SoundPlay
From AutoIt Wiki
Play a sound file. Adapted from AutoIt docs.
Contents |
Syntax
SoundPlay("filename" [,flag])
Parameters
| filename | Name/path of the file to be played. |
| 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) (Optional) |
Return Value
Always returns 1.
Example
Soundplay(@WindowsDir & "\media\tada.wav",1) ; will continue after done playing
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.