Yeah, the concept is ok, but we may be running into a problem since WebParser can't use "Dynamic" variables, and I suspect it isn't seeing that embedded measure name correctly.
Let me load up a test skin and play with it on my end for a few minutes and I'll see what works best.
It is currently September 29th, 2024, 5:31 am
Weather wallpaper changer
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
-
- Posts: 18
- Joined: June 9th, 2010, 12:32 pm
Re: Weather wallpaper changer
Ah yeah I think I read something like that not long ago. Although that still doesn't explain why it didn't work for the Calc measure however, when it works fine in a meter as a mouse action. Let me know what you come up with, cheers.
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather wallpaper changer
Ok, what I have found is that FinishAction only works on the main WebParser measure that has the RegExp, not a secondary measure that uses the primary one as the URL and just calls a StringIndex.
So:
This test skin, which calls a little stub of an app I wrote in AutoIt to just tell me what parms are passed to it, works fine. Something similar in your skin should as well. Sorry for the long RegExp, I didn't feel like writing something new, so I just stole from an existing weather skin.
[MeasureYahooWeather]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1200
URL=http://weather.yahooapis.com/forecastrss?w=12766801&u=f
RegExp="(?siU)<title>.*- (.*)</title>.*<link>(.*)/\*(.*)</link>.*<description>(.*)</description>.*<language>(.*)</language>.*<lastBuildDate>(.*)</lastBuildDate>.*<yweather:location city="(.*)".*region="(.*)".*country="(.*)".*<yweather:units temperature="(.*)".*distance="(.*)".* pressure="(.*)".*speed="(.*)".*<yweather:wind chill="(.*)".*direction="(.*)".*speed="(.*)".*<yweather:atmosphere humidity="(.*)".* visibility="(.*)".*pressure="(.*)".* rising="(.*)".*<yweather:astronomy sunrise="(.*)".*sunset="(.*)".*<title>(.*)</title>.*<width>(.*)</width>.*<height>(.*)</height>.*<link>(.*)</link>.*<url>(.*)</url>.*<title>(.*)</title>.*<geo:lat>(.*)</geo:lat>.*<geo:long>(.*)</geo:long>.*<link>(.*)/\*(.*)</link>.*<pubDate>(.*)</pubDate>.*<yweather:condition text="(.*)".*code="(.*)".*temp="(.*)".*date="(.*)".*<img src="(.*)".*Current Conditions:</b><br />(.*)<BR />.*Forecast:</b><BR />(.*)<br />.*(.*)<br />.*<a href="(.*)/\*(.*)">.*provided by <a href="(.*)" >(.*)</a>.*<yweather:forecast day="(.*)".*date="(.*)".*low="(.*)".*high="(.*)".*text="(.*)".*code="(.*)".*<yweather:forecast day="(.*)".*date="(.*)".*low="(.*)".*high="(.*)".*text="(.*)".*code="(.*)".*"
FinishAction=!Execute ["#CURRENTPATH#TestApp.exe" "[MeasureNowWeatherTemp]"]
[MeasureNowIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureYahooWeather]
StringIndex=35
[MeasureNowWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureYahooWeather]
StringIndex=36
So:
This test skin, which calls a little stub of an app I wrote in AutoIt to just tell me what parms are passed to it, works fine. Something similar in your skin should as well. Sorry for the long RegExp, I didn't feel like writing something new, so I just stole from an existing weather skin.
[MeasureYahooWeather]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1200
URL=http://weather.yahooapis.com/forecastrss?w=12766801&u=f
RegExp="(?siU)<title>.*- (.*)</title>.*<link>(.*)/\*(.*)</link>.*<description>(.*)</description>.*<language>(.*)</language>.*<lastBuildDate>(.*)</lastBuildDate>.*<yweather:location city="(.*)".*region="(.*)".*country="(.*)".*<yweather:units temperature="(.*)".*distance="(.*)".* pressure="(.*)".*speed="(.*)".*<yweather:wind chill="(.*)".*direction="(.*)".*speed="(.*)".*<yweather:atmosphere humidity="(.*)".* visibility="(.*)".*pressure="(.*)".* rising="(.*)".*<yweather:astronomy sunrise="(.*)".*sunset="(.*)".*<title>(.*)</title>.*<width>(.*)</width>.*<height>(.*)</height>.*<link>(.*)</link>.*<url>(.*)</url>.*<title>(.*)</title>.*<geo:lat>(.*)</geo:lat>.*<geo:long>(.*)</geo:long>.*<link>(.*)/\*(.*)</link>.*<pubDate>(.*)</pubDate>.*<yweather:condition text="(.*)".*code="(.*)".*temp="(.*)".*date="(.*)".*<img src="(.*)".*Current Conditions:</b><br />(.*)<BR />.*Forecast:</b><BR />(.*)<br />.*(.*)<br />.*<a href="(.*)/\*(.*)">.*provided by <a href="(.*)" >(.*)</a>.*<yweather:forecast day="(.*)".*date="(.*)".*low="(.*)".*high="(.*)".*text="(.*)".*code="(.*)".*<yweather:forecast day="(.*)".*date="(.*)".*low="(.*)".*high="(.*)".*text="(.*)".*code="(.*)".*"
FinishAction=!Execute ["#CURRENTPATH#TestApp.exe" "[MeasureNowWeatherTemp]"]
[MeasureNowIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureYahooWeather]
StringIndex=35
[MeasureNowWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureYahooWeather]
StringIndex=36
-
- Posts: 18
- Joined: June 9th, 2010, 12:32 pm
Re: Weather wallpaper changer
Cheers for that, no luck unfortunately. Here's what I've got:
Am I missing something here? I can't get my head around why it will work with a mouse action under a meter just fine but not under any measures.
Code: Select all
[MeasureWeather]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1000
URL=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Unit#&dayf=10
RegExp="(?siU).*<locale>(.*)</locale>.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<loc id="(.*)">.*<dnam>(.*)</dnam>.*<tm>(.*)</tm>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<cc>.*<lsup>(.*)</lsup>.*<obst>(.*)</obst>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<uv>.*<i>(.*)</i>.*<t>(.*)</t>.*<dewp>(.*)</dewp>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*"
FinishAction=!Execute ["#CurrentPath#Set.exe" "#CurrentPath#Wallpapers\[MeasureIcon].jpg"]
[MeasureIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureWeather]
StringIndex=20
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather wallpaper changer
You may have mentioned this earlier, but what version of Rainmeter are you on?
-
- Posts: 18
- Joined: June 9th, 2010, 12:32 pm
Re: Weather wallpaper changer
I'm using 2.0
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather wallpaper changer
Ok. Well I think we are at the point where you need to just zip up the entire skin folder, so I get the little app, the icons, and the wallpapers, and host it on MediaFire.com or somewhere and give me a link to it.
I can't see anything significantly different between what I did and what you did, so I must be missing something and need to play with the real thing.
I can't see anything significantly different between what I did and what you did, so I must be missing something and need to play with the real thing.
-
- Posts: 18
- Joined: June 9th, 2010, 12:32 pm
Re: Weather wallpaper changer
Sure thing, here's the link: http://www.mediafire.com/?4sxpkpgdnqcknc8
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather wallpaper changer
Ok, let me play for a few...
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather wallpaper changer
I fired up your skin without changing even one character and got this:
So it works fine for me.
Have you tried completely exiting and restarting Rainmeter? Sometimes when you are testing with WebParser and refresh it over and over really fast it can get super pissed off that you are not letting it finish before calling it again, and just hang.
So it works fine for me.
Have you tried completely exiting and restarting Rainmeter? Sometimes when you are testing with WebParser and refresh it over and over really fast it can get super pissed off that you are not letting it finish before calling it again, and just hang.
You do not have the required permissions to view the files attached to this post.