Initially the skin contains two line graphs, with histogram fills, for monitoring upload and download speeds. What I am attempting to do is make the line graphs (and the fill from the histogram) change color if the bandwidth (upload or download) exceeds a certain specified amount (around 80% of max download or 60% of max upload), and to switch back to the standard color when the throughput drops back under the threshold limits.
Here are my two problems:
- The line colors will not change based on changes in the throughput. I have altered the thresholds and made sure I was crossing them by toggling on some FTP downloads that I know max out my 10mbit connection (which I verified with other tools) but they stubbornly remain grey. Altering the color codes in the 'initialization' of the InLineColor/OutLineColor variables properly passes to the measure, just not the set variable !bang in the NetIn/NetOut measures.
- I don't know how to set the histogram colors - specifically I don't know if I can include multiple IfBelowAction/IfAboveAction commands, or how to properly format them. For this reason there is no histogram color change code included, except the initialization of the variable setting its default.
Code: Select all
[Rainmeter]
Author=Mr.Black
AppVersion=14000
;Metadata added by RainBrowser
;http://rainmeter.net/RainWiki/index.php?title=Rainmeter_101#.5BMetadata.5D
[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=
;End of added Metadata
[Variables]
FontName=Trebuchet MS
FontColour=255,255,255,220
FontHeight=8
InLineColor=255, 255, 255, 45
InHistColor=255,255,255,20
OutLineColor=255, 255, 255, 45
OutHistColor=255,255,255,20
;////////////////////////////////////////
; Uptime Display
;////////////////////////////////////////
[MeasureUptime]
Measure=Uptime
Substitute="d":" day(s)",":":"h "
[MeterUptime.txt]
Meter=STRING
X=5
Y=10
FontColor=#FontColour#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Prefix="Uptime:"
[MeterUptime]
Meter=STRING
MeasureName=MeasureUptime
X=170r
Y=0r
StringAlign=Right
FontColor=#FontColour#
FontSize=#FontHeight#
FontFace=#FontName#
Text="%1min"
AntiAlias=1
;////////////////////////////////////////
; Network Traffic
;////////////////////////////////////////
[TCPIn]
Measure=NetIn
;Roughly 80% capacity on a 1mB line or 800k
IfAboveValue=840000
IfAboveAction=!RainmeterSetVariable InLineColor 255,0,0,255
IfBelowValue=840001
IfBelowAction=!RainmeterSetVariable InLineColor 255,255,255,45
[TCPOut]
Measure=NetOut
;Roughly 60% capacity on a 100kB upload line or 60kB
IfAboveValue=61440
IfAboveAction=!RainmeterSetVariable OutLineColor 255,0,0,255
IfBelowValue=61441
IfBelowAction=!RainmeterSetVariable OutLineColor 255,255,255,45
[TCPInAll]
Measure=NetIn
Cumulative=1
[TCPOutAll]
Measure=NetOut
Cumulative=1
[NetTraffic.txt]
;Meter=STRING
X=5
Y=20r
FontColor=#FontColour#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Text="Network Traffic:"
[TCPIn1]
Meter=HISTOGRAM
MeasureName=TCPIn
X=5
Y=15r
H=27
W=80
PrimaryColor=#InHistColor#
AntiAlias=1
AutoScale=1
DynamicVariables=1
[TCPOut1]
Meter=HISTOGRAM
MeasureName=TCPOut
X=95
Y=0r
H=27
W=80
PrimaryColor=#OutHistColor#
AntiAlias=1
AutoScale=1
DynamicVariables=1
[TCPIn2]
Meter=Line
MeasureName=TCPIn
X=5
Y=0r
H=28
W=80
LineCount=1
DynamicVariables=1
LineColor=#InLineColor#
AntiAlias=1
AutoScale=1
[TCPOut2]
Meter=Line
MeasureName=TCPOut
X=95
Y=0r
H=28
W=80
LineCount=1
LineColor=#OutLineColor#
AntiAlias=1
AutoScale=1
DynamicVariables=1
[NetIn]
Meter=STRING
MeasureName=TCPIn
X=5
Y=0r
FontColor=#FontColour#
FontSize=6
FontFace=#FontName#
AntiAlias=1
AutoScale=1
Text="In: %1B"
[NetOut]
Meter=STRING
MeasureName=TCPOut
X=95
Y=0r
FontColor=#FontColour#
FontSize=6
FontFace=#FontName#
AntiAlias=1
AutoScale=1
Text="Out: %1B"
[MeterRefresh]
Meter=IMAGE
SolidColor=255,255,0,255
x=1r
y=0r
H=20
W=20
LeftMouseDownAction=!RainmeterRefresh