It is currently March 29th, 2024, 10:04 am

WebParser Plugin ?

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

WebParser Plugin ?

Post by trinhanhngoc »

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: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: WebParser Plugin ?

Post by ~Faradey~ »

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 ?

Post by trinhanhngoc »

~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: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: WebParser Plugin ?

Post by jsmorley »

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 ?

Post by trinhanhngoc »

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.