Ok, I added wave and microphone volume controls along with the mutes for both.
Thats the playback mic volume and mute, I don't got a need to mess with the recording one.
Code:
volume_mute::
SoundSet, +1,, MUTE
Gosub, mute
Return
^volume_mute::
SoundSet, +1,MICROPHONE, MUTE
Gosub, mutemic
Return
+volume_mute::
SoundSet, +1,WAVE, MUTE
Gosub, mutewav
Return
volume_up::
SoundSet, +1, MASTER
Gosub, osd
Return
volume_down::
SoundSet, -1, MASTER
Gosub, osd
Return
+volume_up::
SoundSet, +1, WAVE
Gosub, osdwav
Return
+volume_down::
SoundSet, -1, WAVE
Gosub, osdwav
Return
^volume_up::
SoundSet, +1, MICROPHONE
Gosub, osdmic
Return
^volume_down::
SoundSet, -1, MICROPHONE
Gosub, osdmic
Return
osd:
SoundGet, muteM, MASTER, mute
If muteM =On
{
Gosub, mute
Return
}
SoundGet, muteM, WAVE, mute
If muteM =On
{
Gosub, mutewav
Return
}
SoundGet, muteM, MICROPHONE, mute
If muteM =On
{
Gosub, mutemic
Return
}
SoundGet, volM, MASTER
Transform, volM, Ceil, %volM%
IfWinNotExist, Volume Gui
{
Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
Gui, +ToolWindow +AlwaysOnTop -Caption
Gui, Color, 000080
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000080 200
Gui, Show,, Volume Gui
}
GuiControl,, Progress1, %volM%
SetTimer, label, 2000 ;bars are visible for 2 seconds
Return
osdwav:
SoundGet, volWAV, WAVE
Transform, volWAV, Ceil, %volWAV%
IfWinNotExist, VolumeWAV Gui
{
Gui, Add, Progress, vProgress2 w300 h20 cffa500 Background000000
Gui, +ToolWindow +AlwaysOnTop -Caption
Gui, Color, 000080
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000080 180
Gui, Show,, VolumeWAV Gui
}
GuiControl,, Progress2, %volWAV%
SetTimer, label, 2000 ;bars are visible for 2 seconds
Return
osdmic:
SoundGet, volMIC, MICROPHONE
Transform, volMIC, Ceil, %volMIC%
IfWinNotExist, VolumeMIC Gui
{
Gui, Add, Progress, vProgress3 w300 h20 c007ebf Background000000
Gui, +ToolWindow +AlwaysOnTop -Caption
Gui, Color, 000080
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000080 180
Gui, Show,, VolumeMIC Gui
}
GuiControl,, Progress3, %volMIC%
SetTimer, label, 2000 ;bars are visible for 2 seconds
Return
mute:
Transform, volM, Ceil, %volM%
SoundGet, volM, MASTER
SoundGet,master_mute,,MUTE
Gui, Destroy
Gui, Color, 000080
If master_mute = On
{
Gui, font, s20 bold cred, Tahoma
Gui, Add, text,x0 y0, Master Mute On
Gui, Add, Progress, vProgress1 w300 h20 cred Background000000
}
Else
{
Gui, font, s20 bold c87d300, Tahoma
Gui, Add, text,x0 y0, Master Mute Off
Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
}
Gui, +ToolWindow +AlwaysOnTop -Caption
Gui, Color, 000080
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000080 180
Gui, Show,, Volume Gui
GuiControl,, Progress1, %volM%
SetTimer, label, 2000 ;bars are visible for 1 seconds
return
mutewav:
Transform, volWAV, Ceil, %volWAV%
SoundGet, volWAV, WAVE
SoundGet,wave_mute,WAVE,MUTE
Gui, Destroy
Gui, Color, 000080
If wave_mute = On
{
Gui, font, s20 bold cred, Tahoma
Gui, Add, text,x0 y0, Wave Mute On
Gui, Add, Progress, vProgress2 w300 h20 cred Background000000
}
Else
{
Gui, font, s20 bold cffa500, Tahoma
Gui, Add, text,x0 y0, Wave Mute Off
Gui, Add, Progress, vProgress2 w300 h20 cffa500 Background000000
}
Gui, +ToolWindow +AlwaysOnTop -Caption
Gui, Color, 000080
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000080 180
Gui, Show,, VolumeWAV Gui
GuiControl,, Progress2, %volWAV%
SetTimer, label, 2000 ;bars are visible for 1 seconds
return
mutemic:
Transform, volMIC, Ceil, %volMIC%
SoundGet, volMIC, MICROPHONE
SoundGet,microphone_mute,MICROPHONE,MUTE
Gui, Destroy
Gui, Color, 000080
If microphone_mute = On
{
Gui, font, s20 bold cred, Tahoma
Gui, Add, text,x0 y0, Microphone Mute On
Gui, Add, Progress, vProgress3 w300 h20 cred Background000000
}
Else
{
Gui, font, s20 bold c007ebf, Tahoma
Gui, Add, text,x0 y0, Microphone Mute Off
Gui, Add, Progress, vProgress3 w300 h20 c007ebf Background000000
}
Gui, +ToolWindow +AlwaysOnTop -Caption
Gui, Color, 000080
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000080 180
Gui, Show,, VolumeMIC Gui
GuiControl,, Progress3, %volMIC%
SetTimer, label, 2000 ;bars are visible for 1 seconds
return
label:
SetTimer, label, Off
Gui, Destroy
Return
Saw thing post
HERE that talked about using cancel and show with one GUI to stop or slow flicker but didn't understand it.
In the original it had all the sliters show when one was moved but I am not sure I want to do this with this one. For one if more than one was muted the text would stack or something, so if I did do this I would prolly remove the text and just leave it so the bars muted are red.
I am also thinking of adding text to the left of the bar that says Master, Wave, and Mic. That or little icons, like a little mic, a wave and a speaker.
Getting late, I'll see about working on that tomarrow.
Some cool stuff here, Thank you Evl for helping a nub along the road ;p