It is currently September 29th, 2024, 5:28 pm

Problems Changing Fahrenheit to Celsius - Weather

General topics related to Rainmeter.
rassler
Posts: 1
Joined: September 16th, 2013, 9:04 am

Problems Changing Fahrenheit to Celsius - Weather

Post by rassler »

Hello.

I have no problem changing the city however I am trying to make my weather skin to show the temperature in C instead of F but I had no luck whatsoever.

Code: Select all

;[BEGIN CONFIG FILE]==============================

[Rainmeter]
Author=RickF7666

;weather author - Wasek & Demcha, edit by Uruloki Burning & RickF7666
;Radar author - g3xter, edit by RickF7666

[Metadata]
Name=Weather
Version=2.0
Tags=Weather, Radar
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

;End of added Metadata

@include="#SKINSPATH#\Mass Effect\Launcher\Applications.txt"

[Measureweathercod]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName="#SKINSPATH#\Mass Effect\Launcher\Applications.txt"

[Variables]
;weather
FontColor=204,255,255
FontSize=30
FontSize2=24
FontSize3=12
FontSize4=10
FontSize5=9

UpdateRateSeconds=900
FontFace=Slider
ColorF=204,255,255
wURL=#EngCityURL#?tenday
wURL1=#EngCityURL#


;===============================================================

[Background]
Meter=Image
X=0
Y=28
ImageName=GRID.png

[ToplineR]
Meter=IMAGE
ImageName=toplineR.png
X=0
Y=0
AntiAlias=1


[ToplineL]
Meter=IMAGE
ImageName=toplineL.png
X=0
Y=0
AntiAlias=1
hidden=1


;////////////////////////////////////////
;  WEATHER INFO FROM Foreca.ru
;////////////////////////////////////////

[MeasureName]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)<h1>(.*)</h1>.*"
UpdateRate=#UpdateRateSeconds#
Substitute="&deg;":""
StringIndex=1

[MeasureDEN]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)<span class="h5">(.*)</span>.*<span class="h5">(.*)</span>.*<span class="h5">(.*)</span>.*<span class="h5">(.*)</span>.*<span class="h5">(.*)</span>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[MeasureDEN2]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureDEN]
UpdateRate=#UpdateRateSeconds#
StringIndex=2

[MeasureDEN3]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureDEN]
UpdateRate=#UpdateRateSeconds#
StringIndex=3

[MeasureDEN4]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureDEN]
UpdateRate=#UpdateRateSeconds#
StringIndex=4

[MeasureTMAX]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)Hi: <strong>(.*)</strong>.*Hi: <strong>(.*)</strong>.*Hi: <strong>(.*)</strong>.*Hi: <strong>(.*)</strong>.*Hi: <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
Substitute="&deg;":""

[MeasureTMAX2]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureTMAX]
UpdateRate=#UpdateRateSeconds#
StringIndex=2
Substitute="&deg;":""

[MeasureTMAX3]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureTMAX]
UpdateRate=#UpdateRateSeconds#
StringIndex=3
Substitute="&deg;":""

[MeasureTMAX4]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureTMAX]
UpdateRate=#UpdateRateSeconds#
StringIndex=4
Substitute="&deg;":""

[MeasureTMIN]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)Lo: <strong>(.*)</strong>.*Lo: <strong>(.*)</strong>.*Lo: <strong>(.*)</strong>.*Lo: <strong>(.*)</strong>.*Lo: <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
Substitute="&deg;":""

[MeasureTMIN2]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureTMIN]
UpdateRate=#UpdateRateSeconds#
StringIndex=2
Substitute="&deg;":""

[MeasureTMIN3]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureTMIN]
UpdateRate=#UpdateRateSeconds#
StringIndex=3
Substitute="&deg;":""

[MeasureTMIN4]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=[MeasureTMIN]
UpdateRate=#UpdateRateSeconds#
StringIndex=4
Substitute="&deg;":""

[MeasureWeatherIcon]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*"
;"(?siU)<img src="/img/symb-50x50/d(.*).png.*"
StringIndex=1
UpdateRate=#UpdateRateSeconds#

-----------

[MeasureWeatherIcon2]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*"
StringIndex=2
UpdateRate=#UpdateRateSeconds#

[MeasureWeatherIcon3]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*"
StringIndex=3
UpdateRate=#UpdateRateSeconds#

[MeasureWeatherIcon4]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL#
RegExp="(?siU)<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*<div class="symbol_50x50d symbol_d(.*)_50x50" alt.*"
StringIndex=4
UpdateRate=#UpdateRateSeconds#

[MeasureWeatherIconD]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)<div class="symbol_70x70d symbol_d(.*)_70x70 cc_symb">.*"
StringIndex=1
UpdateRate=#UpdateRateSeconds#

[MeasureWeatherIconN]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)<div class="symbol_70x70n symbol_n(.*)_70x70 cc_symb">.*"
StringIndex=1
UpdateRate=#UpdateRateSeconds#

[MeasureF]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)<h4 class="entry-title">(.*)</h4>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[MeasureTF]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)<span class="txt-xxlarge"><strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
                                                                                                                                          
[MeasureFO]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[MeasureOBN]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)<div class="bot txt-tight grey">.*(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
Substitute="Â":"íà"

[MeasureFeelsLike]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)Feels Like: <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
Substitute="&deg;":""

[MeasureBarometer]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)Barometer:  <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[MeasureHumidity]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)Humidity:   <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[Measurewind]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU).*height="28" /> <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[MeasureTR]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU).*Dewpoint:   <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
Substitute="&deg;":""

[MeasureWET]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU).*img/symb-wind/w(.*).gif" alt=".*".*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[MeasureWET2]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU).*img/symb-wind/w(.*).gif" alt="(.*)".*"
UpdateRate=#UpdateRateSeconds#
StringIndex=2

[MeasureSunRise]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)Sun rise: <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1

[MeasureSunSet]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#wURL1#
RegExp="(?siU)Sun set:  <strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1


;////////////////////////////////////////
;  BUTTONS
;////////////////////////////////////////

;Weather

[ButtonWeatherActive]
Meter=IMAGE
ImageName=WeatherActive.png
X=172
Y=0
AntiAlias=1

[ButtonRadarPassive]
Meter=Button
X=-138r
Y=5r
AntiAlias=1
ButtonImage=RadarPassive.png
ButtonCommand=!execute [!ShowMeter ButtonRadarActive] [!HideMeter ButtonWeatherActive] [!ShowMeter ButtonWeatherPassive] [!HideMeter ButtonRadarPassive] [!HideMeter MeterCityName] [!HideMeter MeterFO] [!HideMeter MeterIconD] [!HideMeter MeterIconN] [!HideMeter MeterTF] [!ShowMeter MeterFeelsLikeName] [!HideMeter MeterFeelsLike] [!HideMeter MeterBarometerName] [!HideMeter MeterBarometer] [!HideMeter MeterHumidityName] [!HideMeter MeterHumidity] [!HideMeter MeterwindName] [!HideMeter Meterwind] [!HideMeter MeterIconWet] [!HideMeter Meterwind2] [!HideMeter MeterSunRiseName] [!HideMeter MeterSunRise] [!HideMeter MeterSunSetName] [!HideMeter MeterSunSet] [!HideMeter MeterSunRise] [!HideMeter MeterDEN2] [!HideMeter MeterIcon2] [!HideMeter MeterT2] [!HideMeter MeterDEN3] [!HideMeter MeterIcon3] [!HideMeter MeterT3] [!HideMeter MeterDEN4] [!HideMeter MeterIcon4] [!HideMeter MeterT4] [!HideMeter ToplineR] [!ShowMeter ToplineL] [!ShowMeter Radar] [!ShowMeter Frame]

;Radar

[ButtonRadarActive]
Meter=IMAGE
ImageName=RadarActive.png
X=0
Y=0
AntiAlias=1
hidden=1

[ButtonWeatherPassive]
Meter=Button
X=171r
Y=4r
AntiAlias=1
ButtonImage=Weatherpassive.png
ButtonCommand=!execute [!HideMeter ButtonRadaractive] [!ShowMeter ButtonWeatherActive] [!HideMeter ButtonWeatherPassive] [!ShowMeter ButtonRadarPassive] [!ShowMeter MeterCityName] [!ShowMeter MeterFO] [!ShowMeter MeterIconD] [!ShowMeter MeterIconN] [!ShowMeter MeterTF] [!ShowMeter MeterFeelsLikeName] [!ShowMeter MeterFeelsLike] [!ShowMeter MeterBarometerName] [!ShowMeter MeterBarometer] [!ShowMeter MeterHumidityName] [!ShowMeter MeterHumidity] [!ShowMeter MeterwindName] [!ShowMeter Meterwind] [!ShowMeter MeterIconWet] [!ShowMeter Meterwind2] [!ShowMeter MeterSunRiseName] [!ShowMeter MeterSunRise] [!ShowMeter MeterSunSetName] [!ShowMeter MeterSunSet] [!ShowMeter MeterSunRise] [!ShowMeter MeterDEN2] [!ShowMeter MeterIcon2] [!ShowMeter MeterT2] [!ShowMeter MeterDEN3] [!ShowMeter MeterIcon3] [!ShowMeter MeterT3] [!ShowMeter MeterDEN4] [!ShowMeter MeterIcon4] [!ShowMeter MeterT4] [!ShowMeter ToplineR] [!HideMeter ToplineL] [!HideMeter Radar] [!HideMeter Frame]
hidden=1


;////////////////////////////////////////
;  Weather Meters
;////////////////////////////////////////

[MeterCityName]
Meter=String
MeasureName=MeasureName
X=170
Y=32
W=300
h=20
FontFace=#FontFace#
FontSize=14
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Center
AntiAlias=1
LeftMouseDownAction=!execute ["#EngCityURL#"]
ClipString=1

[MeterFO]
Meter=String
MeasureName=MeasureFO
X=r
Y=10r
w=150
h=40
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Center
AntiAlias=1
ClipString=1

[MeterIconD]
Meter=Image
MeasureName=MeasureWeatherIconD
Path="#CURRENTPATH#WeatherIcons"
X=20
Y=60
H=105
W=105

[MeterIconN]
Meter=Image
MeasureName=MeasureWeatherIconN
Path="#CURRENTPATH#WeatherIconsN"
X=20
Y=60
H=105
W=105

[MeterTF]
Meter=String
MeasureName=MeasureTF
X=143r
Y=58r
FontFace=#FontFace#
FontSize=16
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Center
AntiAlias=1
Postfix="°F"
Angle=1.57

[MeterFeelsLikeName]
Meter=String
X=175
Y=80
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text="Feels Like:"

[MeterFeelsLike]
Meter=String
MeasureName=MeasureFeelsLike
X=70r
Y=r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Postfix="°F"

[MeterBarometerName]
Meter=String
X=-70r
Y=14r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text="Barometer:"

[MeterBarometer]
Meter=String
MeasureName=MeasureBarometer
X=70r
Y=r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1

[MeterHumidityName]
Meter=String
X=-70r
Y=14r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text="Humidity:"

[MeterHumidity]
Meter=String
MeasureName=MeasureHumidity
X=70r
Y=r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1

[MeterWindName]
Meter=String
X=-70r
Y=14r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text="Wind:"

[Meterwind]
Meter=String
MeasureName=Measurewind
X=55r
Y=r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1

[MeterIconWet]
Meter=Image
MeasureName=MeasureWET
Path="#CURRENTPATH#WeatherIconsW"
X=R
Y=1r
w=15
h=15

[Meterwind2]
Meter=String
MeasureName=MeasureWET2
X=R
Y=-1r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1

[MeterSunRiseName]
Meter=String
X=175
Y=14r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text="Sun Rise:"

[MeterSunRise]
Meter=String
MeasureName=MeasureSunRise
X=70r
Y=r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1

[MeterSunSetName]
Meter=String
X=-70r
Y=14r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Text="Sun Set:"

[MeterSunSet]
Meter=String
MeasureName=MeasureSunSet
X=70r
Y=r
FontFace=#FontFace#
FontSize=#FontSize5#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Left
AntiAlias=1


;---------TOMORROW-------

[MeterIcon2]
Meter=Image
MeasureName=MeasureWeatherIcon2
Path="#CURRENTPATH#WeatherIcons"
X=10
Y=190
W=93
h=93
Group=MAX

[MeterDEN2]
Meter=String
X=47r
Y=-17r
FontFace=#FontFace#
FontSize=#FontSize3#
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Center
AntiAlias=1
Text="Tomorrow"
Group=MAX

[MeterT2]
Meter=String
MeasureName=MeasureTMAX2
MeasureName2=MeasureTMIN2
X=r
Y=110r
FontFace=#FontFace#
FontSize=#FontSize4# 
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Center
AntiAlias=1
Text="%1°F, %2°F"
Group=MAX


;---------Day Two-------

[MeterIcon3]
Meter=Image
MeasureName=MeasureWeatherIcon3
Path="#CURRENTPATH#WeatherIcons"
X=60r
Y=190
W=93
h=93
Group=MAX

[MeterDEN3]
Meter=String
MeasureName=MeasureDEN3
X=47r
Y=-17r
W=150
H=30
FontSize=#FontSize3# 
FontColor=#ColorF#
StringStyle=BOLD
FontFace=#FontFace#
StringAlign=Center
AntiAlias=1
Group=MAX

[MeterT3]
Meter=String
MeasureName=MeasureTMAX3
MeasureName2=MeasureTMIN3
X=r
Y=110r
FontSize=#FontSize4# 
FontColor=#ColorF#
StringStyle=BOLD
FontFace=#FontFace#
StringAlign=Center
AntiAlias=1
Text="%1°F, %2°F"
Group=MAX


;---------Day Three-------

[MeterIcon4]
Meter=Image
MeasureName=MeasureWeatherIcon4
Path="#CURRENTPATH#WeatherIcons"
X=60r
Y=190
W=93
h=93
Group=MAX
Hidden=0

[MeterDEN4]
Meter=String
MeasureName=MeasureDEN4
X=47r
Y=-17r
W=150
H=30
FontSize=#FontSize3# 
FontColor=#ColorF#
StringStyle=BOLD
FontFace=#FontFace#
StringAlign=Center
AntiAlias=1
Group=MAX
Hidden=0

[MeterT4]
Meter=String
MeasureName=MeasureTMAX4
MeasureName2=MeasureTMIN4
X=r
Y=110r
FontFace=#FontFace#
FontSize=#FontSize4# 
FontColor=#ColorF#
StringStyle=BOLD
StringAlign=Center
AntiAlias=1
Text="%1°F, %2°F"
Group=MAX
Hidden=0


;////////////////////////////////////////
;  Radar
;////////////////////////////////////////

[RadarMeasure]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateRateSeconds#
Url=#rURL#
Download=1
FinishAction=!Redraw

[Radar]
Meter=IMAGE
MeasureName=RadarMeasure
X=9
Y=58
W=310
H=219
hidden=1

[Frame]
Meter=Image
X=0
Y=20
ImageName=Frame.png
hidden=1

You do not have the required permissions to view the files attached to this post.
Last edited by jsmorley on September 16th, 2013, 11:49 am, edited 1 time in total.
Reason: Edited to use [code] tag
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Problems Changing Fahrenheit to Celsius - Weather

Post by moshi »

Code: Select all

wURL=#EngCityURL#?tenday&quick_units=metric
wURL1=#EngCityURL#?quick_units=metric
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Problems Changing Fahrenheit to Celsius - Weather

Post by moshi »

actually it seems your skin already displays Celsius temperatures.

just replace °F with °C using your text editor.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Problems Changing Fahrenheit to Celsius - Weather

Post by fonpaolo »

moshi wrote:actually it seems your skin already displays Celsius temperatures.

just replace °F with °C using your text editor.
Yes, there are several Postfix="°F"