It is currently September 18th, 2019, 12:12 am

Changing colors

Help with creating, editing & fixing problems with skins
PapaQuakes
Posts: 1
Joined: August 26th, 2019, 12:36 am

Changing colors

PapaQuakes » August 26th, 2019, 12:45 am

I've tried a few different approaches to this and cant get any to work. I'm trying to show a value that if its under a limit value will display one color but changes colors if it goes over that limit value and changes back if it falls back under it. The variation of coding for it I stopped on works for if the value goes over the limit, but will not change back. It doesn't seem that the ifBelowAction line ever gets executed. Here is the example sections of the version of what I have now:

[HWiNFOMOBOTemp1]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=#HWiNFO-MOBO2-SensorId#
HWiNFOSensorInstance=#HWiNFO-MOBO2-SensorInstance#
HWiNFOEntryId=#HWiNFO-MOBO2-Motherboard-Temp#
HWiNFOType=CurrentValue
IfAboveValue=#HWiNFO-MOBO2-TempLimit#
IfAboveAction=[!SetOption MeterHWiNFOMOBOTemp1Value FontColor 255,0,0,255][!Redraw]
IfBelowValue=#HWiNFO-MOBO2-TempLimit#
IfBelowAction=[!SetOption MeterHWiNFOMOBOTemp1Value FontColor 220, 220, 0, 255][!Redraw]
MinValue=0
MaxValue=100

[MeterHWiNFOMOBOTemp1Value]
Meter=String
StringAlign=Right
MeasureName=HWiNFOMOBOTemp1
X=#sWidth#
Y=0r
Text="%1°"
NumOfDecimals=0
MeterStyle=HWiNFOTextStyle
FontColor=#HWiNFOColor2#

I'm not sure what I'm doing wrong or if there is a better way to do it. Any help would be appreciated.
User avatar
Mor3bane
Posts: 586
Joined: May 7th, 2016, 7:32 am

Re: Changing colors

Mor3bane » August 26th, 2019, 3:38 am

This is how i handled my color changing skin:

Code: Select all

...
IfCondition=(MeasureGPU2Temp >= 99)
IfTrueAction=[!SetOption MeterGPU2 FontColor "255,0,0"][!SetOption GPU2 LineColor "255,0,0"][!Redraw *][!UpdateMeter "MeterGPU2"][!UpdateMeter "GPU2"]
IfCondition2=((MeasureGPU2Temp >= 76) && (MeasureGPU2Temp < 98))
IfTrueAction2=[!SetOption MeterGPU2 FontColor "255,175,0"][!SetOption GPU2 LineColor "255,175,0"][!Redraw *][!UpdateMeter "MeterGPU2"][!UpdateMeter "GPU2"]
IfCondition3=(MeasureGPU2Temp < 75)
IfTrueAction3=[!SetOption MeterGPU2 FontColor #ColorZ#][!SetOption GPU2 LineColor #UsedColor#][!Redraw *][!UpdateMeter "MeterGPU2"][!UpdateMeter "GPU2"]
RegExpSubstitute=1
MinValue=0
MaxValue=100
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself