It is currently March 28th, 2024, 9:34 am

WebParser problem, text now showing.

Share and get help with Plugins and Addons
Post Reply
Jerakin
Posts: 3
Joined: October 21st, 2012, 12:48 pm

WebParser problem, text now showing.

Post by Jerakin »

Hi,

I have been trying my best to get it webparser to work but it just don't want to show the IP, I have checked with "RainRegExp" and it returns it alright. But I just will not show.

Code: Select all

[Variables]
FontColor=255, 255, 255, 250
FontName=Arial
FontSize=50

[MeasureIPWeb]
Measure=Plugin
Plugin=WebParser
UpdateRate=21600
Url=http://checkip.dyndns.org
RegExp=(?siU)Address: (.*)</body>
StringIndex=1
Substitute="":"N/A"

[MeterWANIPLabel]
MeasureName=MeasureIPWeb
Meter=STRING
X=0r
Y=15r
FontColor=#FontColor#
FontSize=#FontSize#
FontFace=#FontName#
AntiAlias=1
Text="%1"

[MeterWANIP]
Meter=STRING
MeasureName=MeasureIPWeb
X=137r
Y=60r
StringAlign=Right
FontColor=#FontColor#
FontSize=#FontSize#
FontFace=#FontName#
AntiAlias=1

I am doing something wrong, but I can't figure out what. Any ideas?

Thanks
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: WebParser problem, text now showing.

Post by jsmorley »

First off you need:

DynamicWindowSize=1 in a [Rainmeter] section of your skin at the top.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
FontColor=255, 255, 255, 250
FontName=Arial
FontSize=50

...
This is always going to be true with any skin that 1) has no background meter or other fixed-size meter that defines the overall size of the skin up front. 2) contains meters that are going to "grow" in size as the value changes. This is because without DynamicWindowSize=1 in [Rainmeter], the size of the skin will be set by the first value the meter(s) display, and won't change after that.

This is particularly going to be an issue with anything displaying the value of a WebParser measure, due to the fact that initially it is set to a string value of "" until it is done retrieving data from the resource.

So your skin was working, but displaying the value in a skin with a size of zero by zero. Singularities have limited practical value, unless you are starting a universe.

Then, I'm not sure where you are going with the two meters and your X= and Y= and StringAlign options with the relative positioning, but what you have now is going to give strange results.
4-7-2013 6-35-53 PM.png
Jerakin
Posts: 3
Joined: October 21st, 2012, 12:48 pm

Re: WebParser problem, text now showing.

Post by Jerakin »

Thanks! Now it is working.

I was only going to keep [MeterWANIP] did the other just to test. :)


Thanks a lot.
Post Reply