It is currently April 25th, 2024, 4:25 pm

Network Adpater wont update on change to wifi

Get help with creating, editing & fixing problems with skins
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Network Adpater wont update on change to wifi

Post by jminternelia »

I have a network config which almost behaves as intended, but fails to update properly when the ethernet adapter is disabled/wifi enabled. A manual refresh displays the information correctly.

Here is the intended behavior with Ethernet enabled:

Image

Here is the intended behavior with Ethernet disabled and Wifi enabled:

Image

If I disable the Ethernet adapter enabled and wifi on, this is what happens:

Image

A manual refresh of the skin corrects it to display what the second image shows.

In reverse, if I enable the Ethernet adapter, I get this:

Image

The issue is, the broadcom is the Wifi adapter, and the correct adapter is (Intel[R] Ethernet Connection 1218-V). Again, a manual refresh corrects the issue.

Here is the code:

Code: Select all

; ____________        .__     /\         ____  __________       .__  
;_   \_____  \_____  |__| ___)/  ______ \   \/  |_____  \ __ __|__| 
; |   |/  ____/\__  \ |  |/    \ /  ___/  \     / /  ____/|  |  \  | 
; |   /       \ / __ \|  |   |  \\___ \   /     \/       \|  |  /  | 
; |___\_______ (____  /__|___|  /____  > /___/\  \_______ \____/|__| 
;             \/    \/        \/     \/        \_/       \/          

[Metadata]
Author=12a!n

[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1

[Variables]
BestInterface=Best

[MeterBackground]
Meter=Image
ImageName=#@#Images\Netbox.png
W=453
X=9
Y=56

[IndicatorIn]
Meter=Image
ImageName=#@#Images\Net.png
AntiAlias=1
ImageFlip=Vertical
DynamicVariables=1
ImageTint=90,127,136
X=15
Y=62
W=12

[IndicatorOut]
Meter=Image
ImageName=#@#Images\Net.png
AntiAlias=1
DynamicVariables=1
ImageTint=90,127,136
X=213R
Y=r
W=12

[NetIn]
Measure=Plugin
Plugin=UsageMonitor
Interface=#BestInterface#
Category=Network Adapter
Counter=Bytes Received/sec
Index=1

[NetOut]
Measure=Plugin
Plugin=UsageMonitor
Interface=#BestInterface#
Category=Network Adapter
Counter=Bytes Sent/sec
Index=1

[NetInScaled]
Measure=Calc
Formula=NetIn
IfCondition=NetInScaled > 13107
IfTrueAction=[!SetOption IndicatorIn ImageTint 251,134,80]
IfFalseAction=[!SetOption IndicatorIn ImageTint 90,127,136]

[NetOutScaled]
Measure=Calc
Formula=NetOut
IfCondition=NetOutScaled > 13107
IfTrueAction=[!SetOption IndicatorOut ImageTint 251,134,80]
IfFalseAction=[!SetOption IndicatorOut ImageTint 90,127,136]

[NetworkTrafficGraphLineIn]
Meter=Line
MeasureName=NetIn
X=10
Y=84
H=50
W=226
LineCount=1
LineColor=130,209,222
AutoScale=1
AntiAlias=1

[NetGraphHistogramInCompare]
Meter=HISTOGRAM
MeasureName=NetOut
X=10
Y=84
H=50
W=226
AutoScale=1
PrimaryColor=151,188,196,50
AntiAlias=1

[MeterNetIn]
Meter=String
MeasureName=NetInScaled
FontFace=Denton
FontColor=130,209,222
FontSize=10
AntiAlias=1
NumOfDecimals=1
X=35
Y=60
Scale=131072
Text=%1 Mbps
InlinePattern=\.
InlineSetting=Color | 251,134,80
InlinePattern2=Mbps
InlineSetting2=Color | 251,134,80

[NetworkTrafficGraphLineOut]
Meter=Line
MeasureName=NetOut
X=234
Y=84
H=50
W=226
LineCount=1
LineColor=130,209,222
AutoScale=1
AntiAlias=1

[NetGraphHistogramOutCompare]
Meter=HISTOGRAM
MeasureName=NetIn
X=234
Y=84
H=50
W=226
AutoScale=1
PrimaryColor=151,188,196,50
AntiAlias=1

[MeterNetOut]
Meter=String
MeasureName=NetOutScaled
FontFace=Denton
FontColor=130,209,222
FontSize=10
AntiAlias=1
NumOfDecimals=1
X=262
Y=60
Scale=131072
Text=%1 Mbps
InlinePattern=\.
InlineSetting=Color | 251,134,80
InlinePattern2=Mbps
InlineSetting2=Color | 251,134,80

[MeasureLAN]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=0
SysInfoData=#BestInterface#

[MeasureWANIP]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=http://checkip.dyndns.org
RegExp="(?siU)<body>(.+)Address: (.+)</body>"
UpdateRate=300
StringIndex=2
SysInfoData=#BestInterface#

[MeasureDNS]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=DNS_SERVER
SysInfoData=0

[MeterDividerLineNetwork]
Meter=Image
ImageName=#@#Images\IfaceSperatorsNetwork.png
W=454
X=9
Y=55

[TRAFICANALYSISSTRING]
Meter=STRING
X=15
Y=43
FontFace=Denton
FontColor=71,100,107
FontSize=8
AntiAlias=1
Text=NETWORK TRAFFIC ANALYSIS
UpdateDivider=-1

[IPSTRINGDESC]
Meter=STRING
X=15
Y=98R
FontFace=Denton
FontColor=71,100,107
FontSize=8
AntiAlias=1
Text="LANIP:                                          WANIP:                                           DNS:"
UpdateDivider=-1
InlinePattern=:
InlineSetting=Color | 251,134,80

[LANIP]
MeasureName=MeasureLAN
Interface=#BestInterface#
Meter=STRING
X=72
Y=r
FontFace=Denton
FontColor=130,209,222
FontSize=8
AntiAlias=1
InlinePattern=\.
InlineSetting=Color | 251,134,80

[WAN]
MeasureName=MeasureWANIP
Interface=#BestInterface#
Meter=STRING
X=227
Y=r
FontFace=Denton
FontColor=130,209,222
FontSize=8
AntiAlias=1
InlinePattern=\.
InlineSetting=Color | 251,134,80
DynamicVariables=1

[MaskInvisible]
Meter=Image
SolidColor=0,0,0,1
X=r
Y=r
W=100
H=15
LeftMouseUpAction=[!ToggleMeter Mask][!Redraw]

[Mask]
Meter=Image
SolidColor=0,0,0,255
X=r
Y=r
W=100
H=15
MouseOverAction=[!SetOption Mask SolidColor 0,0,0,0,][!Redraw]
MouseLeaveAction=[!SetOption Mask SolidColor 0,0,0,255][!Redraw]
LeftMouseUpAction=[!ToggleMeter Mask][!Redraw]
DynamicVariables=1

[DNS]
MeasureName=MeasureDNS
Meter=STRING
X=372
Y=r
FontFace=Denton
FontColor=130,209,222
FontSize=8
AntiAlias=1
InlinePattern=\.
InlineSetting=Color | 251,134,80

[MeasureAdapterDesc]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=#BestInterface#
DynamicVariables=1
OnChangeAction=[!UpdateMeter MeterAdapterDisplay][!UpdateMeter *][!Redraw]

[MeasureWifi]
Measure=Plugin
Plugin=WiFiStatus
WiFiInfoType=SSID

[Measure.Signal]
Measure=Plugin
Plugin=WiFiStatus
WiFiInfoType=Quality

[Measure.SignalQuality]
Measure=Calc
Formula=Measure.Signal/100

[MeasureAdapter]
Measure=Plugin
Plugin=SysInfo
SysInfoData=#BestInterface#
SysInfoType=ADAPTER_TYPE
DynamicVariables=1
IfMatch=Wireless
IfMatchAction=[!ShowMeter Meter.SSID][!SetOption Meter.Signal_Quality Text "SIGNAL: %1%"][!HideMeter MeterEthernet][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!HideMeter Meter.SSID][!ShowMeter MeterEthernet][!HideMeter Meter.Signal_Quality][!HideMeter MeterWifi][!UpdateMeter *][!Redraw]

[MeasureAdapterNM]
Measure=Plugin
Plugin=SysInfo
SysInfoType=NET_MASK

[MeasureAdapterLC]
Measure=Plugin
Plugin=SysInfo
SysInfoType=LAN_CONNECTIVITY
DynamicVariables=1
Substitute="1":"CONNECTED","-1":"DISCONNECTED"

[MeasureAdapterIC]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
DynamicVariables=1
Substitute="1":"CONNECTED","-1":"DISCONNECTED"
IfCondition=MeasureAdapter > -1

[MeterAdapterDisplay]
MeasureName=MeasureAdapterDesc
Interface=#BestInterface#
Meter=STRING
X=503
Y=53
FontFace=Denton
StringCase=UPPER
FontColor=130,209,222
FontSize=8
AntiAlias=1
InlinePattern=INTEL
InlineSetting=Color | 251,134,80
InlinePattern2=BROADCOM
InlineSetting2=Color | 251,134,80
DynamicVariables=1

[MeterWifi]
Meter=String
X=r
Y=66
FontFace=Denton
StringCase=UPPER
FontColor=90,127,136
FontSize=8
AntiAlias=1
Text="TYPE: WIFI"
InlinePattern=:
InlineSetting=Color | 130,209,222
InlinePattern2=:(.*)
InlineSetting2=Color | 251,134,80
DynamicVariables=1

[MeterEthernet]
Meter=String
X=r
Y=2R
FontFace=Denton
StringCase=UPPER
FontColor=90,127,136
FontSize=8
AntiAlias=1
Text="TYPE: ETHERNET"
InlinePattern=:
InlineSetting=Color | 130,209,222
InlinePattern2=:(.*)
InlineSetting2=Color | 251,134,80
DynamicVariables=1

[Meter.Signal_Quality]
MeasureName=Measure.Signal
Meter=String
X=r
Y=R
FontFace=Denton
StringCase=UPPER
FontColor=90,127,136
FontSize=8
AntiAlias=1
Text="SIGNAL: %1%"
InlinePattern=:
InlineSetting=Color | 130,209,222
InlinePattern2=:(.*)
InlineSetting2=Color | 251,134,80
DynamicVariables=1

[MeterAdapter3]
MeasureName=MeasureAdapterNM
Meter=STRING
X=r
Y=2R
FontFace=Denton
StringCase=UPPER
FontColor=90,127,136
FontSize=8
AntiAlias=1
Text=NET MASK: %1
InlinePattern=:
InlineSetting=Color | 130,209,222
InlinePattern2=:(.*)
InlineSetting2=Color | 251,134,80
InlinePattern3=\.
InlineSetting3=Color | 130,209,222

[MeterAdapter4]
Meter=STRING
MeasureName=MeasureAdapterLC
X=r
Y=2R
FontFace=Denton
StringCase=UPPER
FontColor=90,127,136
FontSize=8
AntiAlias=1
Text=LAN: %1
InlinePattern=:
InlineSetting=Color | 130,209,222
InlinePattern2=:(.*)
InlineSetting2=Color | 251,134,80

[MeterAdapter5]
Meter=STRING
MeasureName=MeasureAdapterIC
X=r
Y=2R
FontFace=Denton
StringCase=UPPER
FontColor=90,127,136
FontSize=8
AntiAlias=1
Text=INTERNET: %1
InlinePattern=:
InlineSetting=Color | 130,209,222
InlinePattern2=:(.*)
InlineSetting2=Color | 251,134,80
Am I missing something obvious? I have a similar issue in another skin where webparser won't complete download of an image until after the meter has displayed, and as a result, a manual refresh is required. Onfinishaction doesn't help there. Onchangeaction doesn't seem to work here, either.
Last edited by jminternelia on December 28th, 2018, 2:20 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Network Adpater wont update on change to wifi

Post by jsmorley »

https://docs.rainmeter.net/manual/measures/net/#Interface
Notes:

When the option is set to Best, the function will select a "wired" network connection in preference to a "wireless" one, if both are active.

When the option is set to Best, DynamicVariables=1 must be set on the measure if you want it to automatically react to changes in the active interface. This should be done if for instance you have a laptop or other computer that you switch between wired and wireless connections.
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Re: Network Adpater wont update on change to wifi

Post by jminternelia »

That worked partially, however the "Type" meter and "Signal" meter fail to display without a manual refresh.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Network Adpater wont update on change to wifi

Post by jsmorley »

I'm not quite sure. I have run into a similar problem with my setup.

Although I don't switch between ethernet and wifi, I do use a VPN from time to time, and my network skin, which used to react to that switch properly, sorta doesn't anymore. I think there has been some subtle change in how Windows 10 handles network interfaces that I can't put my finger on.

It's tempting to try to detect the change in adapter name, (I think name would be more reliable than type) and automatically do a refresh when that happens, but that gets pretty complicated in order to avoid an endless loop of refreshes. I'll have to chew on it a bit...
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Re: Network Adpater wont update on change to wifi

Post by jminternelia »

jsmorley wrote: December 28th, 2018, 2:45 pm I'm not quite sure. I have run into a similar problem with my setup.

Although I don't switch between ethernet and wifi, I do use a VPN from time to time, and my network skin, which used to react to that switch properly, sorta doesn't anymore. I think there has been some subtle change in how Windows 10 handles network interfaces that I can't put my finger on.

It's tempting to try to detect the change in adapter name, and automatically do a refresh when that happens, but that gets pretty complicated in order to avoid an endless loop of refreshes. I'll have to chew on it a bit...
For what it is worth, I have the same issue on my weather radar. The radar downloads 10 images, 8 doppler images animated via image calc and 2 static images - state/county lines and a topographical map. Never fails that on initial load, the topo map fails to display and a manual refresh is needed. Perhaps there is some way to tie a calc in to delay the update to these specific meters?

By contrast, a !RefreshApp works on both of these skins, which isn't necessarily problematic for the radar, since the topo map shouldn't download again unless there is a new location entered, but that's overkill for a network adapter change.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Network Adpater wont update on change to wifi

Post by jsmorley »

jminternelia wrote: December 28th, 2018, 2:51 pm By contrast, a !RefreshApp works on both of these skins, which isn't necessarily problematic for the radar, since the topo map shouldn't download again unless there is a new location entered, but that's overkill for a network adapter change.
Yeah, the only reliable way to do it so that the current name of the adapter survives the refresh is to write it to a the skin or a .inc file. The problem with that is that you are going to want to check your network adapter name pretty often, say every 5 seconds or something, and that is a lot of writing to the hard drive. I'm not sure I see a satisfactory solution just yet.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Network Adpater wont update on change to wifi

Post by jsmorley »

As far as timing issues with downloading images, I have found the most reliable method is:

Code: Select all

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

[Variables]

[MeasureImage]
Measure=WebParser
URL=https://forum.rainmeter.net/styles/elegance/theme/images/logo.png
Download=1
DownloadFile=RainmeterLogo.png
FinishAction=[!SetOption MeterImage ImageName "[MeasureImage]"][!UpdateMeter MeterImage][!Redraw]

[MeterImage]
Meter=Image
DynanicVariables=1 is not needed on either the WebParser measure, as bangs are always dynamic, or on the Image meter, as !SetOption always dynamically updates the target section.

What I have found is that on occasion, what happens is that the Download function of WebParser creates an empty file with the desired file name, and then proceeds to download it. In the meantime, the Image meter finds and loads the empty file, and caches that image (nothing basically) into memory. Something needs to prod the Image meter into throwing away that cached image and use the "final" version after WebParser is finished downloading it. Using that !SetOption bang seems to accomplish this.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Network Adpater wont update on change to wifi

Post by SilverAzide »

jminternelia wrote: December 28th, 2018, 2:02 pm I have a network config which almost behaves as intended, but fails to update properly when the ethernet adapter is disabled/wifi enabled. A manual refresh displays the information correctly.
One thing to try is to NOT use "Best" for all your measures. Instead leave the measure [MeasureAdapterDesc] as is using Best, but drive all your other measures off this measure's value; i.e., Name=[MeasureAdapterDesc] or SysInfoData=[MeasureAdapterDesc], etc. That way, as soon as the adapter changes, all the other measures will switch automatically.

Secondly, you have a number of meters and measures mixed together, like [LANIP] for example, and measures with invalid parameters, like SysInfoData set on a WebParser measure. Perhaps a little cleanup is needed...
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Network Adpater wont update on change to wifi

Post by jsmorley »

Here is a skin that works for me... It reacts properly when I switch between WiFi and my VPN, and presumably would if I could switch between WiFi and ethernet. Give it a try and see if it does for you. If so, then as said, perhaps you need some cleanup or re-ordering things a bit.

JSNetwork_1.0.rmskin

GIF.gif

Right click and "Copy information to clipboard":

Code: Select all

Qualcomm Atheros AR938x Wireless Network Adapter
WAN:	98.169.240.83
LAN:	192.168.0.100
Router:	192.168.0.1

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
BackgroundMode=2
SolidColor=255,0,0,0
SkinWidth=170
SkinHeight=104
ContextTitle=Open @Includes Folder
ContextAction=["#@#"]
ContextTitle2=---
ContextAction2=[]
ContextTitle3=Open Windows Network Settings
ContextAction3=["ms-settings:network"]
ContextTitle4=Copy Information to Clipboard
ContextAction4=[!SetClip "[MeasureAdapterDesc]#CRLF#WAN:	[MeasureIPWeb]#CRLF#LAN:		[MeasureIPLan]#CRLF#Router:	[MeasureRouter]"][Play "#@#Sounds\Copy.wav"]
ContextTitle5=Manage Router in your Browser
ContextAction5=["http://[MeasureRouter]"]
ContextTitle6=---
ContextAction6=[]
ContextTitle7=More Actions...
ContextAction7=[!SkinMenu]
RightMouseUpAction=!SkinCustomMenu

[Metadata]
Name=NetworkPanel
Author=JSMorley
Information=Description: Network Information. Slide-out WiFi panel.||Instructions:|See @Resources\Network.inc to set important variables!||Right-click skin for more options.
Version=Aug 7, 2016
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
@Include1="#@#GeneralVariables.inc"
@Include2="#@#Network.inc"

; Toggle WIFI Panel on/off

[MeasureShowWIFI]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_TYPE
SysInfoData=#Interface#
UpdateDivider=5
IfMatch=Wireless
DynamicVariables=1
IfMatchAction=[!EnableMeasureGroup "WIFI"][!SetOption MeterAllBackground MeterStyle "BackgroundMouseOver"]
IfNotMatchAction=[!DisableMeasureGroup "WIFI"][!SetOption MeterAllBackground MeterStyle ""]

; Network measures

[MeasureAdapterDesc]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=Best
UpdateDivider=5
DynamicVariables=1

[MeasureNetwork]
Measure=Plugin
Plugin=SysInfo
SysInfoType=LAN_CONNECTIVITY
UpdateDivider=5
DynamicVariables=1
IfCondition=MeasureNetWork = -1
IfTrueAction=[!SetOption MeterWANText Text "None"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterWANText Text ""][!UpdateMeter *][!Redraw]

[MeasureInternet]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
UpdateDivider=5
DynamicVariables=1
IfCondition=MeasureInternet = -1
IfTrueAction=[!SetOption MeterWANText Text "None"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterWANText Text ""][!UpdateMeter *][!Redraw]

[MeasureNetIn]
Measure=NetIn
Interface=#Interface#
DynamicVariables=1
UseBits=1
MinValue=0
MaxValue=(#MaxDownloadMb# * 1048576)

[MeasureNetOut]
Measure=NetOut
Interface=#Interface#
DynamicVariables=1
UseBits=1
MinValue=0
MaxValue=(#MaxUploadMb# * 1048576)

[MeasureSetImage]
Measure=Calc
Formula=1
IfCondition=(MeasureNetIn > 0) && (MeasureNetOut = 0) && (MeasureNetwork > -1) && (MeasureInternet > -1)
IfTrueAction=[!SetVariable NetDnColor #NetTransColor#][!SetVariable NetUpColor #NetQuietColor#][!UpdateMeter *][!Redraw]
IfCondition2=(MeasureNetIn = 0) && (MeasureNetOut > 0) && (MeasureNetwork > -1) && (MeasureInternet > -1)
IfTrueAction2=[!SetVariable NetDnColor #NetQuietColor#][!SetVariable NetUpColor #NetTransColor#][!UpdateMeter *][!Redraw]
IfCondition3=(MeasureNetIn > 0) && (MeasureNetOut > 0) && (MeasureNetwork > -1) && (MeasureInternet > -1)
IfTrueAction3=[!SetVariable NetDnColor #NetTransColor#][!SetVariable NetUpColor #NetTransColor#][!UpdateMeter *][!Redraw]
IfCondition4=(MeasureNetIn = 0) && (MeasureNetOut = 0) && (MeasureNetwork > -1) && (MeasureInternet > -1)
IfTrueAction4=[!SetVariable NetDnColor #NetQuietColor#][!SetVariable NetUpColor #NetQuietColor#][!UpdateMeter *][!Redraw]
IfCondition5=MeasureInternet = -1
IfTrueAction5=[!SetVariable NetDnColor #NetWarnColor#][!SetVariable NetUpColor #NetWarnColor#][!UpdateMeter *][!Redraw]
IfCondition6=MeasureNetwork = -1
IfTrueAction6=[!SetVariable NetDnColor #NetErrorColor#][!SetVariable NetUpColor #NetErrorColor#][!UpdateMeter *][!Redraw]

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=#Interface#
UpdateDivider=5
DynamicVariables=1
RegExpSubstitute=1
Substitute="^$":"None"

[MeasureRouter]
Measure=Plugin
Plugin=SysInfo
SysInfoType=GATEWAY_ADDRESS
SysInfoData=#Interface#
UpdateDivider=5
DynamicVariables=1
RegExpSubstitute=1
Substitute="^$":"None"

[MeasureIPWeb]
Measure=WebParser
URL=http://whatismyip.host/ipv4
RegExp=(?siU)<p class="ipaddress">(.*)</p>
StringIndex=1
UpdateRate=30
RegExpSubstitute=1
Substitute="^$":"None"

; WIFI Measures

[MeasureQuality]
Group=WIFI
Measure=Plugin
Plugin=WifiStatus
DynamicVariables=1
WiFiInfoType=Quality
RegExpSubstitute=1
Substitute="^0$":""

[MeasureDivideQuality]
Group=WIFI
Measure=Calc
Formula=MeasureQuality < 20 ? 1 : (MeasureQuality < 40 ? 2 : (MeasureQuality < 60 ? 3 : (MeasureQuality < 80 ? 4 : 5)))
MinValue=0
MaxValue=5

[MeasureNoSignal]
Group=WIFI
Measure=Calc
Formula=-1
UpdateDivider=-1

[MeasureSSID]
Group=WIFI
Measure=Plugin
Plugin=WifiStatus
DynamicVariables=1
WiFiInfoType=SSID
IfMatch=^-----$
IfMatchAction=[!SetOption MeterQualityText Text "Disconnected  "][!SetOption MeterQualityValue InlineSetting3 "Color | #ValueColor#,1"][!SetOption MeterQuality MeasureName "MeasureNoSignal"][!SetOption MeterRouterValue Text "-----"][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!SetOption MeterQualityText Text "Quality"][!SetOption MeterQualityValue InlineSetting3 "Color | #ValueColor#,255"][!SetOption MeterQuality MeasureName "MeasureDivideQuality"][!SetOption MeterRouterValue Text ""][!UpdateMeter *][!Redraw]
Substitute="-1":"-----"

; Slider

[MeasureSlideBetween]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideNetToWIFI, 10, 10
SlideNetToWIFI=[!SetVariable NetOffSet "(Clamp(#NetOffSet#+17,0,170))"][!SetVariable WIFIOffSet "(Clamp(#WIFIOffSet#-17,0,170))"]#U#
ActionList2=Repeat SlideWIFIToNet, 10, 10
SlideWIFIToNet=[!SetVariable NetOffSet "(Clamp(#NetOffSet#-17,0,170))"][!SetVariable WIFIOffSet "(Clamp(#WIFIOffSet#+17,0,170))"]#U#
DynamicVariables=1

; Network Meters

[BackgroundMouseOver]
MouseOverAction=[!CommandMeasure MeasureSlideBetween "Stop 2"][!CommandMeasure MeasureSlideBetween "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSlideBetween "Stop 1"][!CommandMeasure MeasureSlideBetween "Execute 2"]

[MeterAllBackground]
Meter=Image
W=170
H=104
SolidColor=0,0,0,1

[MeterNetBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,169,103,12 | Fill Color #BackgroundColor# | StrokeWidth 1.5 | Stroke Color #FrameColor#
X=(#NetOffSet#)
W=170
H=104
UpdateDivider=-1
DynamicVariables=1

[MeterWANLabel]
Meter=String
X=(#NetOffSet# + 15)
Y=9
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
DynamicVariables=1
Text=WAN

[MeterWANText]
Meter=String
MeasureName=MeasureIPWeb
W=105
H=17
X=(#NetOffSet# + 154)
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
SolidColor=0,0,0,1
StringAlign=Right
ClipString=1
AntiAlias=1
DynamicVariables=1

[MeterLANLabel]
Meter=String
X=(#NetOffSet# + 13)
Y=2R
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
InlineSetting=CharacterSpacing | 1.5
AntiAlias=1
DynamicVariables=1
Text=LAN

[MeterLANText]
Meter=String
MeasureName=MeasureIPLan
X=(#NetOffSet# + 154)
Y=0r
W=105
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
SolidColor=0,0,0,1
StringAlign=Right
ClipString=1
AntiAlias=1
DynamicVariables=1

[MeterDnLight]
Meter=Shape
X=(#NetOffSet# + 15)
Y=22r
Shape=Ellipse 10,10,6.5 | StrokeWidth 0 | FillColor #NetDnColor#
DynamicVariables=1

[MeterNetInPre]
Meter=String
X=(#NetOffSet# + 46)
Y=1r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
DynamicVariables=1
Text=DN

[MeterNetInText]
MeasureName=MeasureNetIn
Meter=String
X=(#NetOffSet# + 156)
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AutoScale=1
NumOfDecimals=1
AntiAlias=1
DynamicVariables=1
Text=%1b/s

[MeterNetInBar]
Meter=Bar
MeasureName=MeasureNetIn
X=(#NetOffSet# + 46)
Y=0R
W=109
H=1
BarColor=104,199,128,255
SolidColor=#BarBackColor#
BarOrientation=Horizontal
DynamicVariables=1

[MeterUpLight]
Meter=Shape
X=(#NetOffSet# + 15)
Y=2R
Shape=Ellipse 10,10,6.5 | StrokeWidth 0 | FillColor #NetDnColor#
DynamicVariables=1

[MeterNetOUTPre]
Meter=String
X=(#NetOffSet# + 46)
Y=2r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
DynamicVariables=1
Text=UP

[MeterNetOutText]
MeasureName=MeasureNetOut
Meter=String
X=(#NetOffSet# + 156)
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AutoScale=1
NumOfDecimals=1
AntiAlias=1
DynamicVariables=1
Text=%1b/s

[MeterNetOutBar]
Meter=Bar
MeasureName=MeasureNetOut
X=(#NetOffSet# + 46)
Y=0R
W=109
H=1
BarColor=104,199,128,255
SolidColor=#BarBackColor#
BarOrientation=Horizontal
DynamicVariables=1

; WIFI Meters

[MeterWIFIBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,169,103,12 | Fill Color #BackgroundColor# | StrokeWidth 1.5 | Stroke Color #FrameColor#
X=(#WIFIOffSet#)
W=170
H=104
UpdateDivider=-1
DynamicVariables=1

[MeterQuality]
Meter=Image
MeasureName=MeasureDivideQuality
W=40
H=40
X=(#WIFIOffSet# + 9)
Y=5
ImagePath=#ImagePath#\WIFI\Win10\Green
DynamicVariables=1

[MeterHeader]
Meter=String
X=(#WIFIOffSet# + 55)
Y=4r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Left
AntiAlias=1
DynamicVariables=1
Text=WIFI Status

[MeterQualityText]
Meter=String
X=(#WIFIOffSet# + 55)
Y=2R
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
DynamicVariables=1
Text=Quality

[MeterQualityValue]
Meter=String
MeasureName=MeasureQuality
X=(#WIFIOffSet# + 154)
Y=0r
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
DynamicVariables=1
Text=%1%

[MeterSSIDText]
Meter=String
X=(#WIFIOffSet# + 15)
Y=12R
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Left
AntiAlias=1
DynamicVariables=1
Text=SSID

[MeterSSIDValue]
Meter=String
MeasureName=MeasureSSID
X=(#WIFIOffSet# + 154)
Y=0r
W=106
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
ClipString=1
AntiAlias=1
DynamicVariables=1

[MeterRouterText]
Meter=String
X=(#WIFIOffSet# + 15)
Y=1R
W=150
H=15
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
SolidColor=0,0,0,1
StringAlign=Left
AntiAlias=1
DynamicVariables=1
Text=Router

[MeterRouterValue]
Meter=String
MeasureName=MeasureRouter
X=(#WIFIOffSet# + 154)
Y=0r
W=106
H=15
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
ClipString=1
AntiAlias=1
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Re: Network Adpater wont update on change to wifi

Post by jminternelia »

jsmorley wrote: December 28th, 2018, 4:44 pm Here is a skin that works for me... It reacts properly when I switch between WiFi and my VPN, and presumably would if I could switch between WiFi and ethernet. Give it a try and see if it does for you. If so, then as said, perhaps you need some cleanup or re-ordering things a bit.
Turns out I was missing a !Showmeter.

:handtohead:

Thanks.