It is currently March 28th, 2024, 5:02 pm

Weather not working?

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

Post by balala »

Little2 wrote:Worked perfectly, thank you!!
You're welcome.
physchem
Posts: 4
Joined: July 30th, 2016, 4:58 pm

Re: Weather not working?

Post by physchem »

balala wrote:As I wrote above, Yahoo Weather can't be used any more. Sorry...
Ok.

Possible to help resolve this? I'm using "Minimal Typography"

Code: Select all

[Rainmeter]
@include=#@#/var.txt
LeftMouseUpAction=["https://www.google.com/search?q=weather+#location#"]


;----------MEASURES----------

[MeasureWeatherRSS]
Measure=Plugin
Plugin=WebParser
URL=http://xml.weather.yahoo.com/forecastrss?p=#WeatherCode#
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<image>.*<url>(.*)</url>.*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*
FinishAction=!SetOption "MString" "Text" "%1°#unit# %2"
UpdateRate=1800

[MeasureF]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=11

[MeasureC]
Measure=Calc
Formula=(MeasureF - 32) / 1.8
Substitute=" ":""

[MeasureCondition]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=9

[Mtitle]
Y=0
Meter=String
MeterStyle=Style1
FontSize=14
Text=#location#

[Mstring]
X=(10+[Mtitle:W])
Y=0
DynamicVariables=1
Meter=String
MeterStyle=Style2
FontSize=16
MeasureName=Measure#unit#
MeasureName2=MeasureCondition
NumOfDecimals=0
Text=loading
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

Post by balala »

physchem wrote:Possible to help resolve this?
Yes, it is.
You should replace the weather provider. Eg, replace the [MeasureWeatherRSS] measure with the following one:

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=WebParser
UpdateRate=3000
Url=http://wxdata.weather.com/wxdata/weather/local/#WeatherCode#?cc=*&unit=#unit#&dayf=1
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>
FinishAction=!SetOption "MString" "Text" "%1°#unit# %2"
and replace the StringIndex options of the [MeasureF] and [MeasureCondition] as it follows:

Code: Select all

[MeasureF]
...
StringIndex=8

[MeasureCondition]
...
StringIndex=10
physchem
Posts: 4
Joined: July 30th, 2016, 4:58 pm

Re: Weather not working?

Post by physchem »

balala wrote:Yes, it is.
Thank you very much!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

Post by balala »

You're welcome, if it helped.
Rayn
Posts: 6
Joined: October 18th, 2016, 4:55 pm

Any help is appreciated

Post by Rayn »

One of the featured themes, ABP 1.2, has the same issue with the weather.
http://toastbrotpascal.deviantart.com/art/ABP-1-2-173567354
I tried changing the link to xml.weather.yahoo.com but still doesn't work.
Any help is appreciated

Code: Select all

[Rainmeter]
Author=P2C | toastbrotpascal.deviantart.com
Update=1000

@include="#SKINSPATH#\ABP\Variables.txt"
@include2="#SKINSPATH#\ABP\Resources\#Skin#\Colors.txt"

[Variables]
Closed=1
Open=0


[BG]
Meter=IMAGE
ImageName=WeatherBG.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"

[BG2]
Meter=IMAGE
ImageName=WeatherBG2.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
Y=115
Hidden=#Open#
Group=Open

[Bottom]
Meter=IMAGE
ImageName=Bottom.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
Y=186

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=http://xml.weather.yahoo.com/forecastrss?p=#WeatherCode#&u=#Unit#
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<image>.*<url>(.*)</url>.*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*
StringIndex=1

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=11

[MeasureWeatherIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=10

[CurrentTemperature]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp
X=175
Y=70
Postfix="°"
FontSize=12
FontColor=#Color#
StringAlign=RIGHT

[CurrentIcon]
Meter=Image
MeasureName=MeasureWeatherIcon
Path="#SKINSPATH#\ABP\Resources\Weather\LargeIcons"
X=20
W=145

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=9

[WeatherDescription]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherDesc
StringAlign=CENTER
X=97
Y=98
FontSize=8

[Down]
Meter=IMAGE
ImageName=Down.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=86
Y=118
Group=Closed
Hidden=#Closed#
MouseOverAction=!Execute [!RainmeterShowMeter DownH][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter DownH][!RainmeterRedraw]

[DownH]
Meter=IMAGE
ImageName=Down.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=r
Y=r
Hidden=1
ImageTint=#Color#
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Bottom Y 186][!RainmeterWriteKeyValue Variables Closed 1][!RainmeterWriteKeyValue Variables Open 0][!RainmeterHideMeterGroup Closed][!RainmeterShowMeterGroup Open][!RainmeterMoveMeter 0 186 Bottom][!RainmeterHideMeter DownH][!RainmeterRedraw]

[Up]
Meter=IMAGE
ImageName=Up.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=86
Y=189
Group=Open
Hidden=#Open#
MouseOverAction=!Execute [!RainmeterShowMeter UpH][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter UpH][!RainmeterRedraw]

[UpH]
Meter=IMAGE
ImageName=Up.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=r
Y=r
Hidden=1
ImageTint=#Color#
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Bottom Y 115][!RainmeterWriteKeyValue Variables Closed 0][!RainmeterWriteKeyValue Variables Open 1][!RainmeterShowMeterGroup Closed][!RainmeterHideMeterGroup Open][!RainmeterMoveMeter 0 115 Bottom][!RainmeterHideMeter UpH][!RainmeterRedraw]

[TodayText]
Meter=STRING
MeterStyle=Style
FontColor=#Color#
X=28
Y=120
Text="Today:"
Group=Open
Hidden=#Open#

[MeasureWeatherTemp2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=13

[TodayTemperature]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp2
X=R
Y=r
FontSize=8
Postfix="°"
Group=Open
Hidden=#Open#

[MeasureWeatherIcon2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=14

[TodayIcon]
Meter=Image
MeasureName=MeasureWeatherIcon2
Path="#SKINSPATH#\ABP\Resources\Weather\SmallIcons"
X=27
Y=15r
Group=Open
Hidden=#Open#

[MeasureWeatherDate3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=15

[Date3]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherDate3
FontColor=#Color#
X=122
Y=120
FontSize=8
Postfix=":"
Group=Open
Hidden=#Open#

[MeasureWeatherTemp3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=16

[Temperature3]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp3
X=R
Y=r
FontSize=8
Postfix="°"
Group=Open
Hidden=#Open#

[MeasureWeatherIcon3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=17

[Icon3]
Meter=Image
MeasureName=MeasureWeatherIcon3
Path="#SKINSPATH#\ABP\Resources\Weather\SmallIcons"
X=109
Y=15r
Group=Open
Hidden=#Open#

[Yahoo]
Meter=STRING
MeterStyle=Style
X=100
Y=171
Text="Yahoo! Weather"
FontSize=7
StringAlign=CENTER
Group=Open
Hidden=#Open#
LeftMouseUpAction=!Execute ["https://www.yahoo.com/news/weather/croatia/grad-zagreb/zagreb-851128"]
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Any help is appreciated

Post by balala »

Rayn wrote:One of the featured themes, ABP 1.2, has the same issue with the weather.
http://toastbrotpascal.deviantart.com/art/ABP-1-2-173567354
I tried changing the link to xml.weather.yahoo.com but still doesn't work.
Any help is appreciated
It seems that the Yahoo Weather is not working any more. You should change the provider.
I suggest the following solution: replace the URL and RegExp options of the [MeasureWeatherRSS] measure with the following ones:

Code: Select all

[MeasureWeatherRSS]
...
Url=http://wxdata.weather.com/wxdata/weather/local/#WeatherCode#?cc=*&unit=#Unit#&dayf=4
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>
This URL is a functional one, but if you do so, you'll have to replace the StringIndex options of the WebParser measures, as it follows:

Code: Select all

[MeasureWeatherTemp]
...
StringIndex=8

[MeasureWeatherIcon]
...
StringIndex=11

[MeasureWeatherDesc]
...
StringIndex=10

[MeasureWeatherTemp2]
...
StringIndex=22

[MeasureWeatherIcon2]
...
StringIndex=24

[MeasureWeatherDate3]
...
StringIndex=26

[MeasureWeatherTemp3]
...
StringIndex=28

[MeasureWeatherIcon3]
...
StringIndex=30
I suppose this code is very old. To "actualize" it, you should take into account the followings:
  • Both the !Execute bang and the !Rainmeter prefix are deprecated. You should simply remove them. Eg replace the MouseOverAction bang of the [Down] meter (this: MouseOverAction=[color=#FF0000]!Execute[/color] [![color=#FF0000]Rainmeter[/color]ShowMeter DownH][![color=#FF0000]Rainmeter[/color]Redraw]) with this one: MouseOverAction=[!ShowMeter DownH][!Redraw].
  • The Author option was moved from the [Rainmeter] section to the [Metadata]. Do the same.
  • Replace the Plugin=Plugins\WebParser.dll options of all WebParser measures, with the much simpler Plugin=WebParser. It's completely enough.
Also note that you should remove the [Yahoo] meter, as it don't match any more the reality.
Rayn
Posts: 6
Joined: October 18th, 2016, 4:55 pm

Re: Weather not working?

Post by Rayn »

Done. And it works in a way, but for some reason the temp is in F instead of C, and tomorrow says Friday, even though tomorrow's Thursday. Image

Code: Select all

[Rainmeter]
Author=P2C | toastbrotpascal.deviantart.com
Update=1000

@include="#SKINSPATH#\ABP\Variables.txt"
@include2="#SKINSPATH#\ABP\Resources\#Skin#\Colors.txt"

[Variables]
Closed=1
Open=0


[BG]
Meter=IMAGE
ImageName=WeatherBG.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"

[BG2]
Meter=IMAGE
ImageName=WeatherBG2.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
Y=115
Hidden=#Open#
Group=Open

[Bottom]
Meter=IMAGE
ImageName=Bottom.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
Y=186

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=http://wxdata.weather.com/wxdata/weather/local/#WeatherCode#?cc=*&unit=#Unit#&dayf=4
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>
StringIndex=1

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=8

[MeasureWeatherIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=11

[CurrentTemperature]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp
X=175
Y=70
Postfix="°"
FontSize=12
FontColor=#Color#
StringAlign=RIGHT

[CurrentIcon]
Meter=Image
MeasureName=MeasureWeatherIcon
Path="#SKINSPATH#\ABP\Resources\Weather\LargeIcons"
X=20
W=145

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=10

[WeatherDescription]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherDesc
StringAlign=CENTER
X=97
Y=98
FontSize=8

[Down]
Meter=IMAGE
ImageName=Down.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=86
Y=118
Group=Closed
Hidden=#Closed#
MouseOverAction=!Execute [!RainmeterShowMeter DownH][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter DownH][!RainmeterRedraw]

[DownH]
Meter=IMAGE
ImageName=Down.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=r
Y=r
Hidden=1
ImageTint=#Color#
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Bottom Y 186][!RainmeterWriteKeyValue Variables Closed 1][!RainmeterWriteKeyValue Variables Open 0][!RainmeterHideMeterGroup Closed][!RainmeterShowMeterGroup Open][!RainmeterMoveMeter 0 186 Bottom][!RainmeterHideMeter DownH][!RainmeterRedraw]

[Up]
Meter=IMAGE
ImageName=Up.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=86
Y=189
Group=Open
Hidden=#Open#
MouseOverAction=!Execute [!RainmeterShowMeter UpH][!RainmeterRedraw]
MouseLeaveAction=!Execute [!RainmeterHideMeter UpH][!RainmeterRedraw]

[UpH]
Meter=IMAGE
ImageName=Up.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=r
Y=r
Hidden=1
ImageTint=#Color#
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Bottom Y 115][!RainmeterWriteKeyValue Variables Closed 0][!RainmeterWriteKeyValue Variables Open 1][!RainmeterShowMeterGroup Closed][!RainmeterHideMeterGroup Open][!RainmeterMoveMeter 0 115 Bottom][!RainmeterHideMeter UpH][!RainmeterRedraw]

[TodayText]
Meter=STRING
MeterStyle=Style
FontColor=#Color#
X=28
Y=120
Text="Today:"
Group=Open
Hidden=#Open#

[MeasureWeatherTemp2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22

[TodayTemperature]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp2
X=R
Y=r
FontSize=8
Postfix="°"
Group=Open
Hidden=#Open#

[MeasureWeatherIcon2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=24

[TodayIcon]
Meter=Image
MeasureName=MeasureWeatherIcon2
Path="#SKINSPATH#\ABP\Resources\Weather\SmallIcons"
X=27
Y=15r
Group=Open
Hidden=#Open#

[MeasureWeatherDate3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=26

[Date3]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherDate3
FontColor=#Color#
X=122
Y=120
FontSize=8
Postfix=":"
Group=Open
Hidden=#Open#

[MeasureWeatherTemp3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=28

[Temperature3]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp3
X=R
Y=r
FontSize=8
Postfix="°"
Group=Open
Hidden=#Open#

[MeasureWeatherIcon3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=30

[Icon3]
Meter=Image
MeasureName=MeasureWeatherIcon3
Path="#SKINSPATH#\ABP\Resources\Weather\SmallIcons"
X=109
Y=15r
Group=Open
Hidden=#Open#

[Yahoo]
Meter=STRING
MeterStyle=Style
X=100
Y=171
Text="Yahoo! Weather"
FontSize=7
StringAlign=CENTER
Group=Open
Hidden=#Open#
LeftMouseUpAction=!Execute ["https://www.yahoo.com/news/weather/croatia/grad-zagreb/zagreb-851128"]
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

Post by balala »

Rayn wrote:for some reason the temp is in F instead of C,
That is caused by the Unit variable. It probably is placed into the Variables.txt file. Check it and use Unit=m to get the temperatures in Celsius. Note that the valid values for this variable are m (for metric - temperatures in Celsius) or i (imperiale - temperatures in Fahrenheit, but also note that any other value than m, will return the temperatures in Fahrenheit).
Rayn wrote:tomorrow says Friday, even though tomorrow's Thursday.
I rewrote your code, changing a lot of things. As I said, I removed the !Rainmeter prefixes and the !Execute bangs, replaced the Plugin=Plugins\WebParser.dll options with Plugin=WebParser, moved the Author option from the [Rainmeter] section, to [Metadata] and commented out the [Yahoo] meter (didn't removed it entirely, but it can be). I also changed a few StringIndex options:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=80,80,80,160
DynamicWindowSize=1

[Metadata]
Author=P2C | toastbrotpascal.deviantart.com

[Variables]
Closed=1
Open=0
@include="#SKINSPATH#\ABP\Variables.txt"
@include2="#SKINSPATH#\ABP\Resources\#Skin#\Colors.txt"

[BG]
Meter=IMAGE
ImageName=WeatherBG.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"

[BG2]
Meter=IMAGE
ImageName=WeatherBG2.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
Y=115
Hidden=#Open#
Group=Open

[Bottom]
Meter=IMAGE
ImageName=Bottom.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
Y=186

[MeasureWeatherRSS]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://wxdata.weather.com/wxdata/weather/local/#WeatherCode#?cc=*&unit=#Unit#&dayf=4
RegExp=(?siU)<weather ver="(.*)">.*<dnam>(.*)</dnam>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*</moon>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>.*t="(.*)" dt="(.*)">.*<hi>(.*)</hi>.*<low>(.*)</low>.*<icon>(.*)</icon>.*<t>(.*)</t>
StringIndex=1

[MeasureWeatherTemp]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=8

[MeasureWeatherIcon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=11

[MeasureWeatherDesc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=10

[MeasureWeatherDate2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=20

[MeasureWeatherTemp2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=22

[MeasureWeatherIcon2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=24

[MeasureWeatherDate3]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=26

[MeasureWeatherTemp3]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=28

[MeasureWeatherIcon3]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeatherRSS]
StringIndex=30

[CurrentTemperature]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp
X=175
Y=70
Postfix="°"
FontSize=12
FontColor=#Color#
StringAlign=RIGHT

[CurrentIcon]
Meter=Image
MeasureName=MeasureWeatherIcon
Path="#SKINSPATH#\ABP\Resources\Weather\LargeIcons"
X=20
W=145

[WeatherDescription]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherDesc
StringAlign=CENTER
X=97
Y=98
FontSize=8

[Down]
Meter=IMAGE
ImageName=Down.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=86
Y=118
Group=Closed
Hidden=#Closed#
MouseOverAction=[!ShowMeter DownH][!Redraw]
MouseLeaveAction=[!HideMeter DownH][!Redraw]

[DownH]
Meter=IMAGE
ImageName=Down.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=r
Y=r
Hidden=1
ImageTint=#Color#
LeftMouseUpAction=[!WriteKeyValue Bottom Y 186][!WriteKeyValue Variables Closed 1][!WriteKeyValue Variables Open 0][!HideMeterGroup Closed][!ShowMeterGroup Open][!MoveMeter 0 186 Bottom][!HideMeter DownH][!Redraw]

[Up]
Meter=IMAGE
ImageName=Up.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=86
Y=189
Group=Open
Hidden=#Open#
MouseOverAction=[!ShowMeter UpH][!Redraw]
MouseLeaveAction=[!HideMeter UpH][!Redraw]

[UpH]
Meter=IMAGE
ImageName=Up.png
Path="#SKINSPATH#\ABP\Resources\#Skin#"
X=r
Y=r
Hidden=1
ImageTint=#Color#
LeftMouseUpAction=[!WriteKeyValue Bottom Y 115][!WriteKeyValue Variables Closed 0][!WriteKeyValue Variables Open 1][!ShowMeterGroup Closed][!HideMeterGroup Open][!MoveMeter 0 115 Bottom][!HideMeter UpH][!Redraw]

[TodayText]
Meter=STRING
MeterStyle=Style
FontColor=#Color#
X=28
Y=120
Text="Today:"
Group=Open
Hidden=#Open#

[TodayTemperature]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp2
X=R
Y=r
FontSize=8
Postfix="°"
Group=Open
Hidden=#Open#

[TodayIcon]
Meter=Image
MeasureName=MeasureWeatherIcon2
Path="#SKINSPATH#\ABP\Resources\Weather\SmallIcons"
X=27
Y=15r
Group=Open
Hidden=#Open#

[Date2]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherDate2
FontColor=#Color#
X=122
Y=120
FontSize=8
Postfix=":"
Group=Open
Hidden=#Open#

[Temperature2]
Meter=STRING
MeterStyle=Style
MeasureName=MeasureWeatherTemp2
X=R
Y=r
FontSize=8
Postfix="°"
Group=Open
Hidden=#Open#

[Icon2]
Meter=Image
MeasureName=MeasureWeatherIcon2
Path="#SKINSPATH#\ABP\Resources\Weather\SmallIcons"
X=109
Y=15r
Group=Open
Hidden=#Open#

;[Yahoo]
;Meter=STRING
;MeterStyle=Style
;X=100
;Y=171
;Text="Yahoo! Weather"
;FontSize=7
;StringAlign=CENTER
;Group=Open
;Hidden=#Open#
;LeftMouseUpAction=["https://www.yahoo.com/news/weather/croatia/grad-zagreb/zagreb-851128"]
Please tell me if it's better now.
Rayn
Posts: 6
Joined: October 18th, 2016, 4:55 pm

Re: Weather not working?

Post by Rayn »

That is caused by the Unit variable. It probably is placed into the Variables.txt file. Check it and use Unit=m to get the temperatures in Celsius. Note that the valid values for this variable are m (for metric - temperatures in Celsius) or i (imperiale - temperatures in Fahrenheit, but also note that any other value than m, will return the temperatures in Fahrenheit).
My mistake, the old code used c for metric instead of m. It works now.
I rewrote your code, changing a lot of things. As I said, I removed the !Rainmeter prefixes and the !Execute bangs, replaced the Plugin=Plugins\WebParser.dll options with Plugin=WebParser, moved the Author option from the [Rainmeter] section, to [Metadata] and commented out the [Yahoo] meter (didn't removed it entirely, but it can be). I also changed a few StringIndex options:
It's not my code nor do I have any coding knowledge, I'm just a user of the theme, but thank you. I appreciate the help. The days now show as they should. The background of the theme turned gray, but I pinpointed the issue to this part of the code (I'm guessing the solid color part), so I removed it and the background is now back to being transparent:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=80,80,80,160
DynamicWindowSize=1

[Metadata]
Author=P2C | toastbrotpascal.deviantart.com

[Variables]
Closed=1
Open=0
@include="#SKINSPATH#\ABP\Variables.txt"
@include2="#SKINSPATH#\ABP\Resources\#Skin#\Colors.txt"
The other issue, ans this one I can't figure out, is the misalignment of the text which is now outside of the skin.

Image
Post Reply