depending on how much CPU is being used.
I have a sort-of-works solution, but expanding it to my current and later expected needs is bringing me to a halt.
Desired Affect
Right now I have 3 shapes which should display at various stages.
- A small 30 px shape that displays if the CPU activity is below 15%.
- A larger 60 px shape that should display if the CPU activity is between 15% & 30 percent, and also hides the 40 px shape if it was being displayed.
- A final image of 90 px, that should display if the CPU acitivity is above 30%, and hide all other currently shown shapes.
The Problem
My current code only works if I involve 2 images. As soon as I introduce a 3rd image (ie "step" into the [MeasureCPU] Measure, things unravel.
In this example, having a 30 px shape is pointless, as the only way it's ever visible is if it's only turned on (unhidden), because
I can't get it to ever be visible by adding to the [MeasureCPU] Measure.
The Code
Code: Select all
[MeasureCPU]
Measure=CPU
Processor=0
IfAboveValue=30
IfAboveAction=!Execute [!HideMeter Meter60Sphere][!ShowMeter Meter90Sphere]
IfBelowValue=30
IfBelowAction=!Execute [!HideMeter Meter90Sphere][!ShowMeter Meter60Sphere]
[MeasureDelayColor]
Measure=Calc
Formula=MeasureCPU
; CPU Background
[CPUBarBackground]
Meter=Image
ImageName=vertical-background.png
W=150
H=150
ImageFlip=VERTICAL
; 1st Sphere
[Meter30Sphere]
MeasureName=[MeasureDelayColor]
Meter=IMAGE
ImageName=30-percent.png
X=25
Y=25
W=100
H=100
Hidden=0
; 2nd Sphere
[Meter60Sphere]
MeasureName=[MeasureDelayColor]
Meter=IMAGE
ImageName=60-percent.png
X=25
Y=25
W=100
H=100
Hidden=1
; 3rd Sphere
[Meter90Sphere]
MeasureName=[MeasureDelayColor]
Meter=IMAGE
ImageName=90-percent.png
X=25
Y=25
W=100
H=100
Hidden=1