A little background on what the skin is about if you're interested:
Formula=(measureCore01Sum>100?measureCPU[&measureCore01Low]/measureCore01Sum:measureCPU[&measureCore01Low])
The problem is that if [measureCore01Sum] is greater than 100, then the gray bar is not drawn at all, so I'm not sure if there's something wrong with the resulting value of [measureCore01LowValue] due to a mistake in the formula, or if this is more of a problem with updating the skin. You can see I've tried to resolve it by adding FinishAction=[!UpdateMeter meterCore01Low][!Redraw]. I suspect a syntactical error in the conditional though.
Any ideas on how I can resolve this?
Here's what I have so far:
Code: Select all
[Rainmeter]
Update=1000
DefaultUpdateDivider=2
AccurateText=1
DynamicWindowSize=0
SkinWidth=122
BackGroundMode=1
[Variables]
@Include=#PROGRAMPATH#\Skins\HWiNFO\@Resources\HWiNFO.inc
[styleLongBar]
DynamicVariables=1
W=3
H=27
; Four CPU threads on remote computer.
; CPU0/CPU1 are on the first physical core and CPU2/CPU3 on the second.
[measureCPU0]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOHostId=#HWiNFO-RemoteHost0#
HWiNFOSensorId=#HWiNFO-RemoteHost0-CPU0-SensorId#
HWiNFOSensorInstance=#HWiNFO-RemoteHost0-CPU0-SensorInstance#
HWiNFOEntryId=#HWiNFO-RemoteHost0-CPU0-Core0#
HWiNFOType=CurrentValue
HWiNFOLogHandler=0
MinValue=0
MaxValue=100
[measureCPU1]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOHostId=#HWiNFO-RemoteHost0#
HWiNFOSensorId=#HWiNFO-RemoteHost0-CPU0-SensorId#
HWiNFOSensorInstance=#HWiNFO-RemoteHost0-CPU0-SensorInstance#
HWiNFOEntryId=#HWiNFO-RemoteHost0-CPU0-Core1#
HWiNFOType=CurrentValue
HWiNFOLogHandler=0
MinValue=0
MaxValue=100
[measureCPU2]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOHostId=#HWiNFO-RemoteHost0#
HWiNFOSensorId=#HWiNFO-RemoteHost0-CPU0-SensorId#
HWiNFOSensorInstance=#HWiNFO-RemoteHost0-CPU0-SensorInstance#
HWiNFOEntryId=#HWiNFO-RemoteHost0-CPU0-Core2#
HWiNFOType=CurrentValue
HWiNFOLogHandler=0
MinValue=0
MaxValue=100
[measureCPU3]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOHostId=#HWiNFO-RemoteHost0#
HWiNFOSensorId=#HWiNFO-RemoteHost0-CPU0-SensorId#
HWiNFOSensorInstance=#HWiNFO-RemoteHost0-CPU0-SensorInstance#
HWiNFOEntryId=#HWiNFO-RemoteHost0-CPU0-Core3#
HWiNFOType=CurrentValue
HWiNFOLogHandler=0
MinValue=0
MaxValue=100
; Core01
; Determine which of the two threads is least utilized.
; This is done to pick which thread to draw in gray,
; since I want the bar to be mostly white.
[measureCore01Low]
Measure=Calc
Formula=(measureCPU0<measureCPU1?0:1)
DynamicVariables=1
; The sum of the two threads on one physical core.
; Up to 200%.
; Capping the value to 100% though.
[measureCore01Sum]
Measure=Calc
Formula=measureCPU0+measureCPU1
MinValue=0
MaxValue=100
DynamicVariables=1
; What value to set on the lower, gray bar for the less utilized thread.
; If the core is over 100% loaded in total, then the value should be a fraction of the sum of both threads.
; Otherwise, just the measured value of the thread.
[measureCore01LowValue]
Measure=Calc
Formula=(measureCore01Sum>100?measureCPU[&measureCore01Low]/measureCore01Sum:measureCPU[&measureCore01Low])
MinValue=0
MaxValue=100
DynamicVariables=1
FinishAction=[!UpdateMeter meterCore01Low][!Redraw]
; This is the white bar, technically showing the sum of both threads, capped at 100%.
; Gets partially occluded by the gray bar below though,
; so the visible part of the white bar represents the part of the core's performance
; utilized by the thread with the higher load.
[meterCore01High]
Meter=Bar
MeterStyle=styleLongBar
MeasureName=measureCore01Sum
BarColor=255,255,255,255
X=69
Y=7
; The gray bar, drawn on top of the white bar.
; Shows the utlization of the least utilized thread of the core.
; Occludes the same amount that it contributes with to the white bar underneath.
[meterCore01Low]
Meter=Bar
MeterStyle=styleLongBar
MeasureName=measureCore01LowValue
BarColor=192,192,192,255
X=0r
Y=0r
; Core02
; This core "works" in the sense that it always shows the gray bar.
; It has a bug though in that the gray bar will be too long,
; since it doesn't take into account that the gray bar needs
; to be shorter when the sum is greater than 100%. This core
; doesn't adjust the gray bar's value.
; For example, if both threads are at 100%, then the gray bar
; is at 100% and fully occludes the white bar underneath,
; which is not the intended behavior.
[measureCore02Low]
Measure=Calc
Formula=(measureCPU2<measureCPU3?2:3)
DynamicVariables=1
[measureCore02Sum]
Measure=Calc
Formula=measureCPU2+measureCPU3
MinValue=0
MaxValue=100
DynamicVariables=1
[meterCore02High]
Meter=Bar
MeterStyle=styleLongBar
MeasureName=measureCore02Sum
BarColor=255,255,255,255
X=1R
Y=0r
[meterCore02Low]
Meter=Bar
MeterStyle=styleLongBar
MeasureName=measureCPU[&measureCore02Low]
BarColor=192,192,192,255
X=0r
Y=0r