Sam12345 wrote: ↑March 16th, 2021, 8:52 pm
I added that, but now the % gauge doesn't update. Its a bit weird, the blue gauge changes, and so does the actual volume, as well as if I refresh the skin (or mute it and unmute it), but the text % gets stuck on one value. I tried taking away the new code, and these issues went away, so I suppose its this new bit. If its a big issue than it doesn't matter, I'll stick without this bit, I rarely have it on mute anyways.
Just add an
IfConditionMode=1 option to the [MeasureWin7Audio] measure.
If intrested, here is an addition to the skin, which sets red the roundline when the system is muted and blue when it's unmuted. Since I rewrote more things in the code, to apply this, replace the code of your skin with the following one:
Code: Select all
[Rainmeter]
Update=1000
MouseScrollDownAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume -#Step#"][!UpdateMeasure "MeasureWin7Audio"]
MouseScrollUpAction=[!CommandMeasure "MeasureWin7Audio" "ChangeVolume #Step#"][!UpdateMeasure "MeasureWin7Audio"]
BackgroundMode=1
AccurateText=1
@Include=#@#BaseBubble.inc
Group=SYS_Bubbles
[Variables]
Sound=#@#Sounds\volume.wav
Step=2
@IncludeVars=#@#SharedVars.inc
Radius=35
[MyStringStyle]
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
DynamicVariables=1
[StringStyle]
Meter=Shape
MeterStyle=styleGaugeBackMedium
X=40
Y=50
AntiAlias=1
DynamicVariables=1
[ShapeStyle]
X=[StringStyle:X]
Y=[StringStyle:Y]
Shape=Path MyPath | Extend MyModifiers1
MyModifiers1=Fill Color 0,0,0,1 | StrokeWidth 0 | Stroke Color 0,0,0,0
[MeasureWin7Audio]
Measure=Plugin
Plugin=Win7AudioPlugin
MinValue=0
MaxValue=100
IfCondition=(#CURRENTSECTION#<0)
IfTrueAction=[!Setoption volume_Load.Value Text "Mute"][!SetOption Volume_Load.Gauge LineColor "255,0,0"][!UpdateMeasure "MeasureMute"][!UpdateMeter "volume_Load.Value"][!UpdateMeter "Volume_Load.Gauge"][!Redraw]
IfFalseAction=[!Setoption volume_Load.Value Text "[MeasureWin7Audio:]%"][!SetOption Volume_Load.Gauge LineColor "#dataColor1#"][!UpdateMeasure "MeasureMute"][!UpdateMeter "volume_Load.Value"][!UpdateMeter "Volume_Load.Gauge"][!Redraw]
IfConditionMode=1
[MeasureMute]
Measure=Calc
Formula=(( MeasureWin7Audio >= 0 ) ? MeasureWin7Audio : MeasureMute )
MinValue=0
MaxValue=100
[Volume_Load.Gradient]
Meter=Image
ImageName=#@#Images\gradient1.png
W=80
H=80
X=0
Y=10
[Volume_Load.Gauge]
Meter=RoundLine
MeterStyle=styleGaugeMedium
MeasureName=MeasureMute
Container=Volume_Load.Gradient
[Volume_Load.Title]
Meter=String
MeterStyle=styleTextLabel
X=40
Y=30
Text=Volume
[volume_Load.Value]
Meter=String
MeterStyle=styleTextValue
;MeasureName=MeasureWin7Audio
X=0r
Y=0R
[0]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 0"][!UpdateMeasure "MeasureWin7Audio"]
[1]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 9"][!UpdateMeasure "MeasureWin7Audio"]
[2]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 18"][!UpdateMeasure "MeasureWin7Audio"]
[3]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 27"][!UpdateMeasure "MeasureWin7Audio"]
[4]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 36"][!UpdateMeasure "MeasureWin7Audio"]
[5]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 45"][!UpdateMeasure "MeasureWin7Audio"]
[6]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 55"][!UpdateMeasure "MeasureWin7Audio"]
[7]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[!CommandMeasure "MeasureWin7Audio" "SetVolume 64"][!UpdateMeasure "MeasureWin7Audio"]
[8]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 73"][!UpdateMeasure "MeasureWin7Audio"]
[9]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 82"][!UpdateMeasure "MeasureWin7Audio"]
[10]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 90"][!UpdateMeasure "MeasureWin7Audio"]
[11]
Meter=Shape
MeterStyle=ShapeStyle
MyPath=0,0 | LineTo (-#Radius#*Sin(Rad(-#CURRENTSECTION#*30))),(-#Radius#*Cos(Rad(-#CURRENTSECTION#*30))) | LineTo (-#Radius#*Sin(Rad(-(#CURRENTSECTION#+1)*30))),(-#Radius#*Cos(Rad(-(#CURRENTSECTION#+1)*30))) | ClosePath 1
LeftMouseUpAction=[Play "#Sound#"][!CommandMeasure "MeasureWin7Audio" "SetVolume 100"]
Note that in your code, when the system has gone muted, the roundline disappeared. Now it remains visible, but gets a red color (which can be easily changed by replacinf the 255,0,0 color code with the desired on on the
[!SetOption Volume_Load.Gauge LineColor "255,0,0"] bang of the IfTrueAction option of the [MeasureWin7Audio] measure).