What i have done is to check Wifi strength first, then ping; using these rules:
If wifi is disconnected then wifi-measure disables ping-measure.
If wifi is connected then wifi-measure enables ping-measure.
If ping-measure receives a time out it then enables wifi-measure.
If ping receives normal responce then it keeps refreshing until it gets a time out again and disables wifi-measure.
With this i have 3 status: Not connected to network - Connected but no interneted - Connected WITH internet.
The only problem that it presents is that you can get temporaly banned if you ping a site way too often, thus making the workaround useless (so refresh the ping measure less often).
Code: Select all
[MeasureStrength]
Measure=Plugin
Plugin=WifiStatus.dll
WifiInfoType=QUALITY
UpdateDivider=2
[MeasureTextWiFi]
Measure=Calc
Formula=MeasureStrength
IfEqualAction=!Execute [!RainmeterSetVariable Wireless "9"][!RainmeterSetVariable NETcolor "253, 55, 55"][!RainmeterDisableMeasure MeasurePing][!RainmeterDisableMeasure MeasureCalcPing[!RainmeterShowMeter MeterConnected][!RainmeterHideMeter MeterInternet][!RainmeterRedraw]
IfEqualValue=0
IfAboveAction=!Execute [!RainmeterSetVariable Wireless "'"][!RainmeterSetVariable NETcolor "255, 238, 0"][!RainmeterEnableMeasure MeasurePing][!RainmeterEnableMeasure MeasureCalcPing][!RainmeterRedraw]
IfAboveValue=0
UpdateDivider=2
Disabled=0
[MeasurePing]
Measure=Plugin
Plugin=Plugins\PingPlugin
DestAddress=www.google.com
Timeout=5000
TimoutValue=0
UpdateRate=20
Disabled=1
[MeasureCalcPing]
Measure=Calc
Formula=MeasurePing
IfEqualAction=!Execute [!RainmeterShowMeter MeterConnected][!RainmeterHideMeter MeterInternet][!RainmeterEnableMeasure MeasureTextWiFi][!RainmeterRedraw]
IfEqualValue=0
IfAboveAction=!Execute [!RainmeterHideMeter MeterConnected][!RainmeterShowMeter MeterInternet][!RainmeterDisableMeasure MeasureTextWiFi][!RainmeterRedraw]
IfAboveValue=1
UpdateRate=20
Disabled=1
As you can see, i have 2 meters to help me with this. One has 2 states: Wifi disconnected/connected; the other just the one: Internet. Wifi measure enables or disables ping measure AND defines wether the first status meter is connected or disconnected. If Ping gets a time out it hides the internet meter and shows the wifi connection meter, if it gets normal responce it hides the wifi connection meter and shows the internet meter.
Its kinda complicated, but is the only way arround i could figure out. Is messy, but it does the job 90% of the time