It is currently April 19th, 2024, 2:12 pm

Checking Ping From Parent IP Measure

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Checking Ping From Parent IP Measure

Post by Mor3bane »

Am I doing this right (see code).

All I get is a "0" (zero).

Code: Select all

[Rainmeter]
Update=90
Group=small
AccurateText=1

[Metadata]
Author=Morbane

[Variables]
@include=#@#RoundVariables.inc
Color=#GlobalFontColor#
ColorZ=#ColorOffset#
Font=#GlobalFont#
RippleHidden=#SmallRipples#

[MeasureWANIP]
Measure=WebParser
Url=http://checkip.dyndns.org/%22
RegExp="(?siU)<body>(.+)Address: (.+)</body>"
StringIndex=2
OnChangeAction=[!SetOption MeterWANIP FontColor 250,250,20][!UpdateMeasure][!Redraw]

[ImageNumberCalc]
Measure=Calc
Formula=Counter%10
DynamicVariables=1

[MeterRipples]
Meter=Image
ImageName="#@#Ripple\tmp-[ImageNumberCalc].gif"
ImageTint=#Color#
AntiAlias=1
Y=0
X=0
W=200
H=200
DynamicVariables=1
Hidden=1

[MeterFrame]
Meter=Image
ImageName=#@#Frame.png
X=35
Y=35

[MeterToggle]
Meter=Image
X=51
Y=52
W=130
H=130
SolidColor=0,0,0,1
MouseOverAction=[!ShowMeter "MeterRipples][!Redraw]
MouseLeaveAction=[!HideMeter "MeterRipples][!Redraw]
DynamicVariables=1
Hidden=#RippleHidden#

[iptext]
Meter=STRING
X=100
Y=54
FontColor=#Color#
FontSize=13
StringAlign=Center
FontFace=#Font#
AntiAlias=1
Text="IP:"
InlineSetting=CharacterSpacing | 1.5 | 1.5 
DynamicVariables=1

[MeterWANIP]
Meter=String
MeasureName=MeasureWANIP
X=99
Y=76
StringAlign=Center
FontColor=#ColorZ#
FontSize=13
FontFace=#Font#
AntiAlias=1
MouseOverAction=[!SetOption MeterWANIP FontColor #ColorZ#][!Redraw]
LeftMouseDownAction=["C:\Program Files (x86)\NordVPN\NordVPN.exe"]
Text=%1
DynamicVariables=1

[MeasureAdapter]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=Best
Substitute="Intel(R) Ethernet Connection ****":"STANDARD","TAP-NordVPN Windows Adapter V9":"NORD VPN"
DynamicVariables=1

[MeterIfVPN]
Meter=String
MeasureName=MeasureAdapter
X=99
Y=98
Text=%1
StringAlign=Center
FontColor=#Color#
FontSize=13
FontFace=#Font#
AntiAlias=1

[MeasurePing]
Measure=Plugin
Plugin=PingPlugin
DestAddress=[MeasureWANIP]

[MeterPing]
Meter=String
MeasureName=MeasurePing
X=99
Y=119
StringAlign=Center
FontColor=#Color#
FontSize=13
FontFace=#Font#
AntiAlias=1
Text=IP: %1 ms
InlineSetting=Color | #ColorZ#
InlinePattern=IP: (.*)
AntiAlias=1
;Use the below code to reveal your adapter name for both standard internet, and your VPN internet connection.
;Then replace the empty double quote spaces in the Substitute parameter on line 80 in the [MeasureAdapter] Measure.
;Ensure the AccurateText and DynamicWindowSize parameters are in your [Rainmeter] section. DO NOT make the below 
;[Rainmeter] section active.

;;[Rainmeter]
;;Update=1000
;;AccurateText=1
;;DynamicWindowSize=1

;[MeasureAdapter]
;Measure=Plugin
;Plugin=SysInfo
;SysInfoType=ADAPTER_DESCRIPTION
;SysInfoData=Best
;DynamicVariables=1

;[MeterAdapter]
;Meter=String
;MeasureName=MeasureAdapter
;FontSize=11
;FontWeight=400
;FontColor=255,255,255,255
;SolidColor=47,47,47,255
;Padding=5,5,5,5
;AntiAlias=1
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Checking Ping From Parent IP Measure

Post by balala »

Add a DynamicVariables=1 option to the [MeasurePing] measure. It is required because the set up DestAddress option ([MeasureWANIP]) is a section variable, which requires to set up the dynamic variables.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Checking Ping From Parent IP Measure

Post by Mor3bane »

Thanks balala!

I decided to research the the concept and found a web address instead.

However, that may come in very handy for a different meter!

:17good
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Checking Ping From Parent IP Measure

Post by balala »

Glad to help.