My skin will eventually compare the current time with the sunrise and sunset and do way more cool stuff, but my attempt to convert hours into minutes in order to convert time to a real number is just not working.
Code: Select all
[Rainmeter]
Update=-1
OnRefreshAction=[!DisableMeasureGroup Weather][!Redraw]
[XMLdata]
Measure=Plugin
Plugin=WebParser
URL=http://wxdata.weather.com/wxdata/weather/local/#ZipCode#?cc=*&unit=f
RegExp=(?siU)^(.*)$
ForceReload=1
FinishAction=[!EnableMeasureGroup Weather][!Redraw]
DynamicVariables=1
[GetSunInfo]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[XMLdata]
RegExp=(?siU)<sunr>(.*):(.*) (.*)</sunr>.*<suns>(.*):(.*) (.*)</suns>
DynamicVariables=1
[SunriseHour]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[GetSunInfo]
StringIndex=1
DynamicVariables=1
[SunriseMinute]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[GetSunInfo]
StringIndex=2
DynamicVariables=1
[SunriseAM_PM]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[GetSunInfo]
StringIndex=3
Substitute="AM":"0","PM":"1"
DynamicVariables=1
[Rise_CompiledHour]
Measure=Calc
Group=Weather
Formula=SunriseAM_PM * 12 + SunriseHour
DynamicVariables=1
[Rise_Time]
Measure=Calc
Group=Weather
Formula=Rise_CompiledHour * 60 + SunriseMinute
DynamicVariables=1
I've also looked at other weather skins that do work and I don't see anything different with what they're doing. I think.
Also, if you see any way to make this huge block of code smaller, please let me know, I'd be much obliged.