It is currently May 27th, 2020, 3:47 am

Can't print webparser value

Help with creating, editing & fixing problems with skins
grodcor
Posts: 2
Joined: May 14th, 2020, 7:39 am

Can't print webparser value

Post by grodcor »

Hello,
i'm writing a very simple weather skin but can't print on screen any value I get from webparser.

I'm retrieving the data from:
http://api.openweathermap.org/data/2.5/weather?id=3110044&mode=xml&appid=aaf61c6d02e79b07215a7f91adcb3e76

I'm running this code for try if I can extract the TIMEZONE from the XML and print it on screen (later, I need to parse the icon code on the xml, but if I can't out this to work...)

Code: Select all

[Rainmeter]
Update=1000

[Variables]
LocationID=3110044

[MeasureParent]
Measure=WebParser
URL=http://api.openweathermap.org/data/2.5/weather?id=#LocationID#&mode=xml&appid=aaf61c6d02e79b07215a7f91adcb3e76
RegExp=(?siU)<timezone>(.*)</timezone>
Debug=2

[MeasureChild1]
Measure=WebParser
URL=[MeasureParent]
StringIndex=1

[MeterChild1]
Meter=string
measurename=MeasureChild1
FontSize=100
But nothing appears.

WebParserDump is correctly loaded, I've tried RainRegExp and the output is correct (it must be 7200), and the WebParserTest skin has all lights green.

I don't know what happens.

Somebody can help? Please?
User avatar
balala
Rainmeter Sage
Posts: 10605
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can't print webparser value

Post by balala »

grodcor wrote:
May 14th, 2020, 7:58 am
I don't know what happens.

Somebody can help? Please?
First add a DynamicWindowSize=1 option to the [Rainmeter] section of the code.
Secondly make sure your skin is not on a completely black background, because since there is no FontColor set on the [MeterChild1] meter, it writes the value with the default font color, which is black. If the skin is on a black background, you see nothing, having black fonts on black background.
grodcor
Posts: 2
Joined: May 14th, 2020, 7:39 am

Re: Can't print webparser value

Post by grodcor »

wow, that's it!!

Just added DynamicWindowSize and worked

Thx!!
User avatar
balala
Rainmeter Sage
Posts: 10605
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can't print webparser value

Post by balala »

grodcor wrote:
May 14th, 2020, 8:32 am
Just added DynamicWindowSize and worked
Alright, I'm glad.