This works perfectly when I am not playing the game. When I move my throttle to the correct position, it plays the sound. But when I am playing the game it doesn't work. While the game is running, and if I click on a desktop window and test it, it works fine. If I click back on the game and test it, it doesn't work.
There is an option in the Windows Audio Output to allow applications to take exclusive control of an output. I have unchecked this, but it also made no difference.
The ErrorLevel does not pop up any errors. So, I don't know what is wrong.
I can play songs in WinAmp while the game is running, but this SoundPlay and SoundBeep do not work.
Code: Select all
^!\:: ; Ctrl+Alt+\ ; Soundset, -20 ;lowers volume ; Soundset, +20;raises volume back to original ; SoundSetWaveVolume, 70 ; Set the volume to its half-way point. SoundBeep, 750, 500 ; SoundPlay, SmallClick.mp3, WAIT if ErrorLevel MsgBox, ErrorLevel ;Msgbox "beep" return