Thanks for the details. Are good to be known.jsmorley wrote: ↑May 6th, 2020, 3:56 pm Yes, if you use UpdateRate=-1 that doesn't do what UpdateDivider=-1 does. What it does is cause a weird "wrap around" of the number being used as the "counter" for threaded measures like WebParser and Ping, and what you actually get is UpdateRate=SomeGiganticNumber, I'm don't remember what it is, something like the largest integer size of a 16-bit integer in C. Big... In any case, for all practical purposes the behavior is sorta what you expect, as the measure will update once, then not again for 1,000 years or something, but I don't recommend it. I think it makes more sense, in all cases, to leave UpdateDivider alone on those measures. Leave it as the default "1". Then set UpdateRate to something sensible for the behavior you want, or UpdateRate=86400 or some other large number (that is the number of seconds in a day) if you want it to execute once and then stop.
It is currently April 26th, 2024, 7:37 pm
What is my local IP Address(es)
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: What is my local IP Address(es)
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: What is my local IP Address(es)
Yes, it happens to all of us sometimes. I knew about this just because a while ago (in October last year, more precisely), I had that conversation with jsmorley, which I linked above.Yincognito wrote: ↑May 6th, 2020, 4:06 pm Oops, didn't know that. I just used the value I saw in the already posted code, I figured there was a good reason for it to be set this way. Guess I was wrong then...
-
- Posts: 2
- Joined: May 5th, 2020, 6:56 am
Re: What is my local IP Address(es)
Thanks!! This one worked what I wanted.... Thank you for your help balala ^_^balala wrote: ↑May 5th, 2020, 8:41 am I'd use a SysInfo plugin measure. This plugin has two values for the SysInfoType option used to check if the computer is connected to LAN, respectively to internet.
For instance the following measure returns 1 if the computer is connected to LAN and -1 if it's not:(if you'd like to check internet connectivity, replace the SysInfoType=LAN_CONNECTIVITY option with SysInfoType=INTERNET_CONNECTIVITY)Code: Select all
[MeasureLAN] Measure=Plugin Plugin=SysInfo SysInfoType=LAN_CONNECTIVITY
Accordingly to the returned value you should show up the IP address if the computer is connected or the Disconnected string otherwise. An IfCondition can be used to decide:Note that the above IfFalseAction disables the [MeasureIPwifi] measure if the computer isn't connected and enables it otherwise.Code: Select all
[MeasureLAN] Measure=Plugin Plugin=SysInfo SysInfoType=LAN_CONNECTIVITY IfCondition=(#CURRENTSECTION#>0) IfTrueAction=[!EnableMeasure "MeasureIPwifi"][!CommandMeasure "MeasureIPwifi" "Update"][!SetOption MeterText Text "%1"][!UpdateMeter "MeterText"][!Redraw] IfFalseAction=[!DisableMeasure "MeasureIPwifi"][!SetOption MeterText Text "Disconnected"][!UpdateMeter "MeterText"][!Redraw]
And the [MeterText] String meter, which shows up the IP address or Disconnected:Code: Select all
[MeterText] Meter=String MeasureName=MeasureIPwifi X=0 Y=0 Padding=15,5,15,5 FontColor=220,220,220 SolidColor=0,0,0,150 FontSize=8 FontFace=Segoe UI StringStyle=BOLD StringAlign=LEFT AntiAlias=1
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: What is my local IP Address(es)
I'm glad and you're welcome.o0oHAVOKo0o wrote: ↑May 11th, 2020, 5:31 am Thanks!! This one worked what I wanted.... Thank you for your help balala ^_^