You set a skin update of 10 seconds... to reduce the timig of your looping refresh; I reset it to 1000 ms.
You mixed up the IfCondition numbering in your second set of measures [OnlineStatus1] & [OnlineStatus2] ... "IfCondition1=..." should be "IfCondition2=...", "IfCondition3=...", etc.
But in looking at your code, you are
1) checking the value of the sysinfo adapter label
2) replacing that with a number
3) using that number to try to refresh
4) using that value in 2 new measures to check the number value again
5) using that result to set a color value
6) not updating or redrawing anything
... that is just overkill.
I moved the font color changes to your initial VPN measures and removed the Status measure completely. Those measures are really not needed, you can take those actions in the first 2 measures [MeasureVPN1] & [MeasureVPN2]. In order to see the changes to meter options, you should update the meters and redraw them.
Try this modified code with those changes (No VPN here so you will need to test):
Code: Select all
; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------
[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Metadata]
; Contains basic information of the skin.
Name=VPN Status
[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------
[MeasureVPN1]
Measure=Plugin
Plugin=SysInfo
SysInfoData="VPN1"
SysInfoType=ADAPTER_DESCRIPTION
Substitute="VPN1":"1","Realtek PCIe GBE Family Controller":"0"
IfCondition=MeasureVPN1 = 1
IfTrueAction=[!SetOption MeterValueVPN1 FontColor 0,255,0,155][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterValueVPN1 FontColor 0,0,0,90][!UpdateMeter *][!Redraw]
IfConditionMode=1
[MeasureVPN2]
Measure=Plugin
Plugin=SysInfo
SysInfoData="VPN_2"
SysInfoType=ADAPTER_DESCRIPTION
Substitute="VPN_2":"1","Realtek PCIe GBE Family Controller":"0"
IfCondition=MeasureVPN2 = 1
IfTrueAction=[!SetOption MeterValueVPN2 FontColor 0,255,0,155][!UpdateMeter *][!Redraw]
IfFalseAction1=[!SetOption MeterValueVPN2 FontColor 0,0,0,90][!UpdateMeter *][!Redraw]
IfConditionMode=1
; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------
[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1
[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15
; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------
[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=VPN Status
; Even though the text is set to System, Rainmeter will display
; it as SYSTEM, because styleTitle contains StringCase=Upper.
LeftMouseUpAction=["taskmgr.exe"]
; Left-clicking this meter will launch taskmgr.exe (the Task Manager).
ToolTipText=Open Task Manager
; Hovering over this meter will display a tooltip with the text above.
; ----------------------------------
; VPN VPN display images, text, bars, etc.
; ----------------------------------
[meterLabelVPN1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=VPN_1
[MeterValueVPN1]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureVPN1
FontColor=0,0,0,90
X=200
Y=0r
W=190
H=14
Text=ACTIVE
[meterBarVPN1]
Meter=Bar
MeterStyle=styleBar
MeasureName=MeasureVPN1
X=10
Y=52
W=190
H=1
[meterLabelVPN2]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=VPN_2
[MeterValueVPN2]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureVPN2
FontColor=0,0,0,90
X=200
Y=0r
W=190
H=14
Text=ACTIVE
[meterBarVPN2]
Meter=Bar
MeterStyle=styleBar
MeasureName=MeasureVPN2
X=10
Y=72
W=190
H=1