It is currently April 25th, 2024, 1:51 am

Need coding help, I'm missing something

Get help with creating, editing & fixing problems with skins
mkboynton
Posts: 23
Joined: January 31st, 2016, 10:52 pm

Need coding help, I'm missing something

Post by mkboynton »

I can't figure out what I am missing. When the vpn is turned on or off the ip addresses are supposed to update. My logic is not working and I can't figure out why. The vpn status updates just fine, but not the ip addresses. Code is below.

Code: Select all

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
; #@# is equal to Rainmeter\Skins\illustro\@Resources
AccurateText=1
DynamicWindowSize=1

[Metadata]
Name=IpAddress
Author=Mike Boynton
Information=Get's public and private ip addresses and shows status of VPN.
Version=1.1
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

;--Variables--

[Variables]
fontName=Trebuchet MS
textSize=10
colorText=255,255,255,205

;--Measures--

[MeasureNetwork]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=1
RegExpSubstitute=1
Substitute="^(.*)\.(.*)\.(.*)\.(.*)$":"\1"

[OnlineStatus]
Measure=Calc
Formula=[MeasureNetwork]
IfBelowValue = 11
IfBelowAction=[!EnableMeasure MeasureDelay_5Sec1][!SetOption MeterNetworkStatus FontColor 0,255,0,155][!SetOption MeterNetworkStatus Text "ON"][!UpdateMeter MeterNetworkStatus][!ReDraw]
IfAboveValue = 11
IfAboveAction=[!EnableMeasure MeasureDelay_5Sec1][!SetOption MeterNetworkStatus FontColor 255,0,0,255][!SetOption MeterNetworkStatus Text "OFF"][!UpdateMeter MeterNetworkStatus][!ReDraw]
DynamicVariables=1
;FinishAction=[!EnableMeasure MeasureIPLan][!EnableMeasure MeasureIPWeb]
;[!UpdateMeasure MeasureIPLan][!UpdateMeasure MeasureIPWeb]

[MeasureDelay_5Sec1]
Measure=Calc
Formula=MeasureDelay_5Sec1 + 1
IfEqualValue=5
IfEqualAction=[!EnableMeasure MeasureIPLan][!UpdateMeasure MeasureIPLan][!EnableMeasure MeasureIPWeb][!UpdateMeasure MeasureIPWeb][!DisableMeasure MeasureDelay_5Sec1]
Disabled=1

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=BEST
Disabled=1
;FinishAction=[!EnableMeasure MeasureDelay_5Sec2][!DisableMeasure MeasureIPLan]

[MeasureIPWeb]
Measure=WebParser
URL=http://icanhazip.com/
RegExp=(?siU)^(.*)$
StringIndex=1
Disabled=1
FinishAction=[!DisableMeasure MeasureIPLan][!DisableMeasure MeasureIPWeb][!EnableMeasure MeasureDelay_5Sec2]

[MeasureDelay_5Sec2]
Measure=Calc
Formula=MeasureDelay_5Sec2 + 1
IfEqualValue=5
IfEqualAction=[!UpdateMeter MeterPrivateIPData][!UpdateMeter MeterPublicIPData][!Redraw][!DisableMeasure MeasureDelay_5Sec2]
Disabled=1

;--Styles--

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=11
InlineSetting=Underline
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
Padding=0,0,5,0

[styleSeperator]
SolidColor=255,255,255,50

;--Meters--

[Background]
Meter=Shape
Shape=Rectangle 0,0,300,108,12.5 | Fill Color 3,4,38,255

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=150
Y=1
W=295
H=18
Text=Network Info

[MeterPrivateIPText]
Meter=String
MeterStyle=styleLeftText
X=10
Y=29r
W=[meterTitle:W]
H=24
Text=Your private IP address is:

[MeterPrivateIPData]
Meter=String
MeasureName=MeasureIPLan
MeterStyle=styleRightText
X=[meterTitle:W]
Y=r
W=[meterTitle:W]
H=24
Text=%1

[meterSeperator0]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=20r
W=([meterTitle:W]-14)
H=1

[MeterPublicIPText]
Meter=String
MeterStyle=styleLeftText
X=10
Y=4r
W=[meterTitle:W]
H=24
Text=Your public IP address is:

[MeterPublicIPData]
Meter=String
MeasureName=MeasureIPWeb
MeterStyle=styleRightText
X=[meterTitle:W]
Y=r
W=[meterTitle:W]
H=24
Text=%1

[meterSeperator1]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=20r
W=([meterTitle:W]-14)
H=1

[MeterNetwork]
Meter=String
MeterStyle=styleLeftText
AntiAlias=1
Text=Your VPN Status:
X=10
Y=4r
W=[meterTitle:W]
H=24

[MeterNetworkStatus]
Meter=String
MeasureName=OnlineStatus
MeterStyle=styleRightText
AntiAlias=1
Text=
X=[meterTitle:W]
Y=r
W=[meterTitle:W]
H=24