I use SoundSetWaveVolume() to raise before the alert and then lower the wave volume after the alert is played, but haven't found a control for the master volume. If you see it, please post it. I'd like to add it to the scanner. So far, I usually leave my master volume at maximum. I play the alerts at the maximum wave volume too. I find anything lower is too low to hear over the engine noise. Next car radio, I'll have an aux input. This will take care of this low volume problem.
Here's the code part for the volume
Opt("WinTitleMatchMode", 2)
ShellExecute("C:\Windows\system32\sndvol32.exe","","","", @SW_MINIMIZE )
sleep(300)
$sound_slider = ControlGetHandle("olume", "", "msctls_trackbar324")
sleep(100)
$volume = (_GUICtrlSliderGetPos($sound_slider)/5)
;MsgBox(4096,"1365", _GUICtrlSliderGetPos($sound_slider))
if $volume = -1 Then
ShellExecute("C:\Windows\system32\sndvol32.exe","","","", @SW_MINIMIZE )
sleep(300)
$sound_slider = ControlGetHandle("olume", "", "msctls_trackbar324")
sleep(100)
$volume = (_GUICtrlSliderGetPos($sound_slider)/5)
;MsgBox(4096,"1370", _GUICtrlSliderGetPos($sound_slider))
endif
$volume_int = Int($volume)
$volume_prior = 100 - $volume_int
sleep(100)
;MsgBox(4096,"", $volume_prior)
SoundSetWaveVolume($input_5)
Sleep(100)
$file_sound = IniRead(@UserProfileDir & "\POI_Scanner.ini", "Section1", "sound_file", "")
SoundPlay($file_sound, 1)
Select
case IniRead(@UserProfileDir & "\POI_Scanner.ini", "Section1", "Scanner_1", 0) = 1
SoundPlay(@ScriptDir & "\distance_250.mp3", 1)
case IniRead(@UserProfileDir & "\POI_Scanner.ini", "Section1", "Scanner_1", 0) = 2
SoundPlay(@ScriptDir & "\distance_500.mp3", 1)
case IniRead(@UserProfileDir & "\POI_Scanner.ini", "Section1", "Scanner_1", 0) = 3
SoundPlay(@ScriptDir & "\distance_1000.mp3", 1)
case IniRead(@UserProfileDir & "\POI_Scanner.ini", "Section1", "Scanner_1", 0) = 4
SoundPlay(@ScriptDir & "\distance_1500.mp3", 1)
case IniRead(@UserProfileDir & "\POI_Scanner.ini", "Section1", "Scanner_1", 0) = 5
SoundPlay(@ScriptDir & "\distance_2000.mp3", 1)
EndSelect
SoundSetWaveVolume($volume_prior)
sleep(100)
WinClose("olume")
BTW: Some day you'll have to tell me how you post code and maintain the original colors of the script editor.