It is currently March 29th, 2024, 12:06 am

Changing colors

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

Changing colors

Post by PapaQuakes »

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: 943
Joined: May 7th, 2016, 7:32 am

Re: Changing colors

Post by Mor3bane »

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 - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.