hello,
I'm kinda new to this, been looking for a problem im having. I want to auto-adjust my text of my cpu temp when its above 40degrees it should be color 1 (red) and below color 2 (green). but i think im missing something in the code. Is someone able to help me with it? this is what i have currently i tried to use the Ifcondition but it doesnt work (or i dont understand how to use it)
[MeasureCore0Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0
[Temp0°C]
Meter=STRING
MeasureName=MeasureCore0Temp
X=55
Y=60
FontColor=24,254,252,255
FontSize=20
FontFace=NewMedia
StringAlign=Center
AntiAlias=1
Text=%1°C
NumOfDecimals=0
[Core0text]
Meter=String
X=15
Y=35
FontSize=20
FontFace=NewMedia
FontColor=24,254,252,255
StringAlign=Left
AntiAlias=1
Text=Core0
[Temptext]
"Meter=String
"X=10
"Y=85
"FontSize=20
"FontFace=NewMedia
"FontColor=24,254,252,255
"StringAlign=Left
"AntiAlias=1
"Text=Temp:
It is currently April 26th, 2024, 8:44 am
automatic color changing on temp reading
-
- Posts: 5
- Joined: December 24th, 2016, 3:01 pm
automatic color changing on temp reading
Last edited by Sakujura on December 24th, 2016, 4:35 pm, edited 1 time in total.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: automatic color changing on temp reading
This is related to bars, but the principle is the same: https://forum.rainmeter.net/viewtopic.php?p=124176#p124176
-
- Posts: 5
- Joined: December 24th, 2016, 3:01 pm
Re: automatic color changing on temp reading
Thanks,
gonne see if i can get out of it
gonne see if i can get out of it
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: automatic color changing on temp reading
You're welcome.
If you have problems, don't worry, ask here and someone will help you.
If you have problems, don't worry, ask here and someone will help you.
-
- Posts: 5
- Joined: December 24th, 2016, 3:01 pm
Re: automatic color changing on temp reading
Thx, got it finally working
[MeasureCore0Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0
IfCondition=MeasureCore0Temp <= 25
IfTrueAction=!SetOption Temp0°C FontColor #0,0,255,255#
IfCondition2=(MeasureCore0Temp > 25) && (MeasureCore0Temp <= 28)
IfTrueAction2=!SetOption Temp0°C FontColor "0,255,0,255"
IfCondition3=(MeasureCore0Temp > 28) && (MeasureCore0Temp <= 35)
IfTrueAction3=!SetOption Temp0°C FontColor "255,255,0,255"
IfCondition4=MeasureCore0Temp > 35
IfTrueAction4=!SetOption Temp0°C FontColor "255,0,0,255"
IfConditionMode=1
[Temp0°C]
Meter=STRING
MeasureName=MeasureCore0Temp
X=55
Y=60
FontColor=[MeasureCore0Temp]
FontSize=20
FontFace=NewMedia
StringAlign=Center
AntiAlias=1
Text=%1°C
NumOfDecimals=0
DynamicVariables=1
[MeasureCore0Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0
IfCondition=MeasureCore0Temp <= 25
IfTrueAction=!SetOption Temp0°C FontColor #0,0,255,255#
IfCondition2=(MeasureCore0Temp > 25) && (MeasureCore0Temp <= 28)
IfTrueAction2=!SetOption Temp0°C FontColor "0,255,0,255"
IfCondition3=(MeasureCore0Temp > 28) && (MeasureCore0Temp <= 35)
IfTrueAction3=!SetOption Temp0°C FontColor "255,255,0,255"
IfCondition4=MeasureCore0Temp > 35
IfTrueAction4=!SetOption Temp0°C FontColor "255,0,0,255"
IfConditionMode=1
[Temp0°C]
Meter=STRING
MeasureName=MeasureCore0Temp
X=55
Y=60
FontColor=[MeasureCore0Temp]
FontSize=20
FontFace=NewMedia
StringAlign=Center
AntiAlias=1
Text=%1°C
NumOfDecimals=0
DynamicVariables=1
Last edited by Sakujura on December 24th, 2016, 7:43 pm, edited 1 time in total.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: automatic color changing on temp reading
You're welcome.
I'm glad you solved your problem.
I'm glad you solved your problem.
-
- Rainmeter Sage
- Posts: 16172
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: automatic color changing on temp reading
Just note Sakujura, that in such cases the IfConditionMode=1 option is not needed on the [MeasureCore0Temp] measure. When the temperature range is changing, the appropriate !SetOption will be executed, and when it's not, the same !SetOption is not needed to be executed on each update cycle. I'd remove that option (IfConditionMode=1).
Also take care that the FontColor=[MeasureCore0Temp] option is not needed (and in fact it's even useless) on the [Temp0°C] meter, because its color is set by the corresponding !SetOption bangs of the [MeasureCore0Temp] measure. Remove it, as well.
Also take care that the FontColor=[MeasureCore0Temp] option is not needed (and in fact it's even useless) on the [Temp0°C] meter, because its color is set by the corresponding !SetOption bangs of the [MeasureCore0Temp] measure. Remove it, as well.