It is currently September 20th, 2019, 12:59 pm

WebParser Plugin ?

Help with creating, editing & fixing problems with skins
trinhanhngoc
Posts: 23
Joined: May 23rd, 2010, 3:48 pm

WebParser Plugin ?

trinhanhngoc » June 5th, 2010, 4:53 am

I use Rainmeter 1.2 RC.

Code: Select all

[MeasureTest]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url="http://www.google.com"
RegExp="(?siU)<title>(.*)</title>"

[MeterTest]
Meter=String
MeasureName=MeasureTest
X=30
Y=30
FontColor=FFFFFF
FontSize=12
StringAlign=Left
Antialias=1
StringIndex=1
It didn't show anything on my desktop. What's wrong ?
User avatar
~Faradey~
Posts: 367
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: WebParser Plugin ?

~Faradey~ » June 5th, 2010, 6:10 am

StringIndex=1 should be in [MeasureTest] not in [MeterTest]

Here:

Code: Select all

[MeasureTest]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url="http://www.google.com"
RegExp="(?siU)<title>(.*)</title>"
UpdateRate=1800
StringIndex=1

[MeterTest]
Meter=String
MeasureName=MeasureTest
X=30
Y=30
FontColor=FFFFFF
FontSize=12
StringAlign=Left
Antialias=1
trinhanhngoc
Posts: 23
Joined: May 23rd, 2010, 3:48 pm

Re: WebParser Plugin ?

trinhanhngoc » June 5th, 2010, 6:43 am

~Faradey~ wrote:StringIndex=1 should be in [MeasureTest] not in [MeterTest]

Here:

Code: Select all

[MeasureTest]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url="http://www.google.com"
RegExp="(?siU)<title>(.*)</title>"
UpdateRate=1800
StringIndex=1

[MeterTest]
Meter=String
MeasureName=MeasureTest
X=30
Y=30
FontColor=FFFFFF
FontSize=12
StringAlign=Left
Antialias=1
Thanks you but still not working.
User avatar
jsmorley
Developer
Posts: 19462
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: WebParser Plugin ?

jsmorley » June 5th, 2010, 6:59 am

trinhanhngoc wrote: Thanks you but still not working.
The only meter you have in the skin is a string meter that is "" when the skin is first loaded. So the "container" that Rainmeter builds for the skin is 0 pixels by 0 pixels and nothing shows.

If you add these two lines to the top, it works fine.

[Rainmeter]
DynamicWindowSize=1

Or if you define the width and height of that string meter large enough to hold the text being returned, it also works, but I far prefer approach one, since you normally can't know what is going to be between <title> and </title> or you wouldn't need WebParser.

If you had other meters in the skin that already created a container big enough for at least some of the word "Google" to appear in that meter, the problem may not have occurred for you, or been more evident if the "Google" had been cut off instead of not there at all.
trinhanhngoc
Posts: 23
Joined: May 23rd, 2010, 3:48 pm

Re: WebParser Plugin ?

trinhanhngoc » June 5th, 2010, 7:11 am

jsmorley wrote: The only meter you have in the skin is a string meter that is "" when the skin is first loaded. So the "container" that Rainmeter builds for the skin is 0 pixels by 0 pixels and nothing shows.

If you add these two lines to the top, it works fine.

[Rainmeter]
DynamicWindowSize=1

Or if you define the width and height of that string meter large enough to hold the text being returned, it also works, but I far prefer approach one, since you normally can't know what is going to be between <title> and </title> or you wouldn't need WebParser.

If you had other meters in the skin that already created a container big enough for at least some of the word "Google" to appear in that meter, the problem may not have occurred for you, or been more evident if the "Google" had been cut off instead of not there at all.
Fine. Thanks you.