SoundPlay mp3 or SoundBeep during a game doesn't work. Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Snacko
Posts: 2
Joined: 08 Feb 2017, 10:21

SoundPlay mp3 or SoundBeep during a game doesn't work.

Yesterday, 13:04

I play a flight simulator called DCS and setup my throttle to play a sound when it gets to about 80% on the axis so that I know I am at Max Military power before going full Afterburner. (some throttles have a detent/bump in the axis, mine doesn't)

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
Snacko
Posts: 2
Joined: 08 Feb 2017, 10:21

Re: SoundPlay mp3 or SoundBeep during a game doesn't work.  Topic is solved

Today, 12:59

I finally found out that I had to put the ~ (Tilda) key in front of the Hotkey command. This allowed the Hotkey to passthrough my game app, and 'be seen' by Hotkey.

Return to “Ask For Help”

Who is online

Users browsing this forum: alonzam99, Bing [Bot], bojo5150, esp901, Flipeador, paik1002, teadrinker and 38 guests