My ask is can anyone direct me on hot to modify this to show the volume percent in Red if the volume is muted,
or even better, the word Mute in red instead of a volume level percentage?
And also if possible, to make the mini Gui click-through? At the moment I have it over the notification center,
but ideally I would like to place it as an overlay on the volume icon, but still be able to click the volume to change it.
My attempts at using GuiControl and the various examples I've found of +E0x20 have been fruitless.
Code: Select all
GWide := A_ScreenWidth - 50
GHigh := A_ScreenHeight - 40
SetTimer, ShowVol, 500
Gui,
+AlwaysOnTop
-Caption
+Border
Gui, Color, 1B1F21
GUI, Margin, 3, 2
Gui, Font, s10 cFFFFFF, Calibri
Gui, Add, Text, x5 y5, VOL :
Gui, Font, s11 cLIME, Calibri
Gui, Add, Text, x5 y18 w45 vVolumeText,
Gui, Show, x%GWide% y%GHigh% w45 h40, Vol-Level
; OnMessage(0x0201, "WM_LBUTTONDOWNdrag") ; In case display is needed to move.
SetTimer, UpdateVolume, 500
Return
UpdateVolume:
SoundGet, Volume
VolumePercentage := Round(Volume)
GuiControl,, VolumeText, %VolumePercentage% `%
Return
ShowVol:
Gui, Show, NA, Vol-Level
Return