It is currently September 29th, 2024, 9:39 pm
General topics related to Rainmeter.
ney2x
Posts: 4 Joined: December 20th, 2012, 12:16 pm
Post
by ney2x » January 8th, 2013, 3:46 pm
First of all, Happy New Year to all!
Can anyone help me... I just want the value to change font color, red if > 60, green < 60, and so on...
This is my code:
Code: Select all
[Rainmeter]
Update=500
[Variables]
fontColor.Text=255, 255, 255
graph.line1=64, 64, 64
graph.line2=255, 255, 255, 75
FontName=HandelGotDLig
FontHeight=9
AntiAlias=1
Address=ph.gameclub.com
Label=#Address#
[MeasurePing]
Measure=Plugin
Plugin=Plugins\PingPlugin
DestAddress=#Address#
UpdateRate=1
[Meter.Ping_Graph1]
Meter=Line
MeasureName=MeasurePing
X=50
Y=5
H=43
W=200
LineCount=1
LineColor=#graph.line1#
AntiAlias=1
AutoScale=1
[Meter.Ping_Graph2]
Meter=HISTOGRAM
MeasureName=MeasurePing
X=50
Y=5
H=42
W=200
PrimaryColor=#graph.line2#
AntiAlias=1
AutoScale=1
[Meter.Bar_Background]
Meter=Image
X=50
Y=50
W=200
H=14
SolidColor=#graph.line2#
[Meter.Header]
Meter=STRING
X=5
Y=50
StringStyle=NORMAL
StringAlign=LEFT
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Text="PING"
[Meter.Ping]
Meter=STRING
MeasureName=MeasurePing
X=250
Y=50
FontColor=255, 255, 255
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
NumOfDecimals=0
AutoScale=1
Text="%1ms"
StringAlign=Right
[Meter.Adress]
Meter=STRING
X=50
Y=48
StringStyle=Normal
StringAlign=Left
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
Text="#Address#"
Thanks in advance!
moshi
Posts: 1740 Joined: November 13th, 2012, 9:53 pm
Post
by moshi » January 8th, 2013, 5:53 pm
one method would be:
Code: Select all
[Color]
Measure=Calc
Formula=([MeasurePing]) < 60 ? 1 : 0
DynamicVariables=1
Substitute="0":"FF0000","1":"00FF00"
[Meter.Ping]
Meter=STRING
MeasureName=MeasurePing
X=250
Y=50
FontColor=[Color]
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
NumOfDecimals=0
AutoScale=1
Text="%1ms"
StringAlign=Right
DynamicVariables=1
ney2x
Posts: 4 Joined: December 20th, 2012, 12:16 pm
Post
by ney2x » January 8th, 2013, 7:13 pm
Oh! Thank you so much for your quick reply and help. It's working now, but I notice it doesn't refreshes the color immediately, I mean it waits a couple of seconds (5-10 secs) before it changed to default color (downloading some files and pausing). I change the color you gave me to > 60 = green (00F53D), < 60 = red (FF0000). Anyways, thanks much for this, you gave a plenty of ideas now...
ney2x
Posts: 4 Joined: December 20th, 2012, 12:16 pm
Post
by ney2x » January 24th, 2013, 5:17 pm
This is another question for my ping skin, please help me...
What if I want:
< 60 is Green
>= 60 & < 200 is Yellow
>= 200 & < 300 is is Orange
> 300 is Red
What is the right Formula for these?
Thanks in advance.
rethu
Posts: 4 Joined: March 1st, 2013, 7:25 am
Post
by rethu » March 1st, 2013, 7:39 am
nice post