Hey, here is the code for my verticle volume control.
Note that my commandlist is called "MATRIX".
MATRIX is a bar that attaches to the right side of my secondary monitor;
my volume control slider is there.
So if you import, make sure and change "MATRIX" to the name of your bar
for all occurrences of "MATRIX" in the script. You need to identify the
bar for the volume slider code.
When I move the slider UP, it lowers the volume.
When I move the slider DOWN, it raises the volume. - I think you want
it the other way though...
but, something else,
when I turn the slider to zero, it checks the mute button checkbox
automatically.
But if you just check the mute button, you don't lose your sliders set
volume. That way, if you uncheck the mute checkbox, the volume is
restored to its previous setting.
This works like a charm! And then, the label will tell you the current
volume as a number.
Note that the MATRIX bar is blue, so the volume number shows up rather
subtly.
FYI, the bar is 48 pix wide and is as tall as the screen.
[MATRIX:Properties]
[1]
id = slider
Label = *control slider (volume) 0 255 50 both clientedge vertical
Format = back: 52 101 164 Height: 100 Width: 46
LCmd1 = exec.volumeall(cl.getctrlvalue("MATRIX","slider"))
LCmd2 = if(cl.getctrlvalue("MATRIX","slider")==
LParam2 = "0")
LCmd3 = cl.SetCtrlValue("MATRIX",
LParam3 = "mute", 2)
LCmd4 = else
LCmd5 = cl.SetCtrlValue("MATRIX",
LParam5 = "mute", 0)
LCmd6 = Endif
MCmd1 = (none)
RCmd1 = (none)
[2]
Label = *info expr(volume)
Format = text: 74 126 198 Width: 28 Disable
FontName = Arial
FontInfo = Weight: 400 Size: 11
LCmd1 = (none)
MCmd1 = (none)
RCmd1 = (none)
[3]
id = mute
Label = *control button autocheckbox clientedge (muted) clientedge
Format = back: 52 101 164 text: 255 255 255 Height: 22 Width: 15
LCmd1 = if(cl.getctrlvalue("MATRIX","mute")!=muted)
LCmd2 = exec.mute
MCmd1 = (none)
RCmd1 = (none)