It is currently April 23rd, 2024, 5:57 pm

varaible color roundmeters?

Get help with creating, editing & fixing problems with skins
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

varaible color roundmeters?

Post by ItsJustRyan »

Hi!

I've been trying to do some more tweaking on the volume skin, and im trying to get it to have a different color when the volume is at a 100, but the if condition true thing doesnt seem to change the variable. what do i do?

Code: Select all

[Rainmeter]
Update=1

[Metadata]
Author=Ryan

[Variables]
UsedColor=FF8800
FellColor=255,255,255,0
OnCol=0,0,0
@include=#@#Variables.inc

[mVolume]
 Measure=Plugin
 Plugin=NowPlaying.dll
 PlayerName=AIMP
 PlayerType=Volume

[mVolume2]
 Measure=Calc
 Formula=mVolume
 IfCondition=(mVolume = -1)||(mVolume = 0)
 IfTrueAction=[!SetOption "Perc" "Text" "X"][!Update]
 IfFalseAction=[!SetOption "Perc" "Text" "%1"][!Update]
; IfCondition=(mVolume = -1)
; IfTrueAction=[!SetOption "Text2.Brightness" "Text" "Mute"][!Update]
; IfFalseAction=[!SetOption "Text2.Brightness" "Text" "%1%"][!Update]

[mVolume3]
Measure=Calc
Formula=mVolume
IfCondition=(mVolume = 100)
IfTrueAction=[!SetVariable OnCol "22bb45"]
IfFalseAction=[!SetVariable OnCol "FF8800"]


[MeterVol]
Meter=Roundline
MeasureName=mVolume
X=10
Y=0
W=120
H=120
StartAngle=-4.712
RotationAngle=6.283
LineLength=20
LineColor=#OnCol#
Solid=1
AntiAlias=1
 MouseScrollDownAction=[!CommandMeasure "mVolume" "SetVolume -5"][!Update]
 MouseScrollUpAction=[!CommandMeasure "mVolume" "SetVolume +5"][!Update]


[MeterEllipse]
Meter=Shape
Shape=Ellipse 70,60,16 | Stroke Color #FellColor#

[Perc]
Meter=String
MeasureName=mVolume
x=70
y=49
StringAlign=Center
FontFace=Century Gothic
FontWeight=500
FontColor=#UsedColor#
Text=%1
FontSize=12
AntiAlias=1


[code]
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: varaible color roundmeters?

Post by jsmorley »

You need to use DynamicVariables=1 on the Roundline meter. It is using a variable that is being dynamically changed for the color.
ItsJustRyan
Posts: 81
Joined: October 25th, 2019, 1:20 am

Re: varaible color roundmeters?

Post by ItsJustRyan »

Thanks! This worked :)
User avatar
balala
Rainmeter Sage
Posts: 16162
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: varaible color roundmeters?

Post by balala »

Beside jsmorley's reply, note that Update=1 in the [Rainmeter] section isn't valid. The lowest possible value for Update is 16 (second paragraph here). But I suppose you wanted to use the default Update=1000.
Update is expressed in milliseconds, Update=1000 means one update per 1000 milliseconds = 1 second.