It is currently September 19th, 2024, 8:05 pm

Ping - works ... almoast

Introduce yourself to the Rainmeter community!
Shouri
Posts: 8
Joined: July 25th, 2011, 10:07 am

Ping - works ... almoast

Post by Shouri »

Hey

Ok so i want the green picture 2.png to be visible if my second pc is on 10.1.1.8
and the red picture 1.png to be visible if its off

im using ping but according to pingplugin.dll my ping is 0ms.
If i ping through cmd i will get 1-2ms.

So how can i set the Ifbelowvalue= when there is nothing smaller than 0:

Code: Select all

[Pingligth]
Measure=Plugin
Plugin=Plugins\PingPlugin.dll
DestAddress=10.1.1.8
TimeoutValue=9001
UpdateRate=1
DynamicVariables=1
IfAboveValue=0
IfAboveAction=!RainmeterSetVariable ImageNumber 2
IfBelowValue=0
IfBelowAction=!RainmeterSetVariable ImageNumber 1

[Variables]
ImageNumber=2

[MeterResult]
Meter=Image
ImageName=#CURRENTPATH#images\#ImageNumber#.png
DynamicVariables=1
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Ping - works ... almoast

Post by Kaelri »

If you set the following, the measure will return a value of -1 when it fails to connect. :) It'll take about ten seconds to time out.

Code: Select all

Timeout=10000
TimeoutValue=-1
Because the plugin is apparently rounding to zero for very low numbers, I would also use that as your conditional values:

Code: Select all

IfAboveValue=-1
IfAboveAction=!RainmeterSetVariable ImageNumber 2
IfEqualValue=-1
IfEqualAction=!RainmeterSetVariable ImageNumber 1
Tested with Rainmeter 2.1 Beta r874.
Shouri
Posts: 8
Joined: July 25th, 2011, 10:07 am

Re: Ping - works ... almoast

Post by Shouri »

Thanks :welcome: