It is currently March 28th, 2024, 6:26 pm

VPN skin not updating

Get help with creating, editing & fixing problems with skins
Darv
Posts: 13
Joined: September 27th, 2015, 1:48 am

Re: VPN skin not updating [SOLVED!!]

Post by Darv »

Thanks eclectic-tech!!

That did work! I had to fix the { to a (
and then add a DynamicVariables=1
in the [MeasureNetwork] section.

I had been looking at IfMatch earlier but not good enough at this to determine how to put it to work. Thanks for the help. I have a working script and will get it uploaded and on line so others can use it.

Cheers,
Darvin Atkeson



eclectic-tech wrote: November 17th, 2020, 3:02 am Use IfMatch and the string value of the network description measure rather than substituting the text with numbers .

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=3
SolidColor=0,0,0,90

[Metadata]
; Contains basic information of the skin.
Name=VPN Status

[MeasureNetwork]
Measure=Plugin
Plugin=SysInfo
SysInfoData=Best
SysInfoType=ADAPTER_DESCRIPTION
IfMatch={?i)^Private Internet Access Network Adapter$
IfMatchAction=[!SetOption MeterNetwork FontColor 0,255,0,155][!SetOption PiaIcon ImageName pia_on.png][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!SetOption MeterNetwork FontColor 255,0,0,255][!SetOption PiaIcon ImageName pia_off.png][!UpdateMeter *][!Redraw]

[PiaIcon]
Meter=Image
ImageName=pia_gray.png
W=30
H=30
X=8
Y=7

[MeterNetwork]
Meter=String
FontSize=30
FontColor=167,167,167,255
StringStyle=Bold
AntiAlias=1
Text= VPN
X=40
The IfMatch uses RegExp to set the options directly:
when [MeasureNetwork] equals "Private Internet Access Network Adapter" the match actions are taken
when [MeasureNetwork] equals any other text, the not match actions.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: VPN skin not updating

Post by eclectic-tech »

Sorry about the typos, didn't try the code, so I missed those. :Whistle
Glad you got it working! :great:
Post Reply