This is just a quick reminder on how to play sound files with AutoIt. The AutoIt SoundPlay function will be used in this article.
Note. Playing certain files may require that you install the required cookies on your computer first.
It can sometimes be useful to play a sound, often to alert the system administrator to a script has encountered an error, has finished running, or some other situation. To do this, use the below code.
The above example assumes that MyFile.wav is located in the same directory as your script. It should also be possible to play other files, such as .mp3 files, given that the required cookies are installed on the system.
The last parameter: 1, indicates that the script should not exit, before the file stops playing.