It is currently March 28th, 2024, 9:17 pm

Help with achieving a simple skin

Get help with installing and using Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Here is a first solution. Let's test it, to see how does it work.
I post the whole rewritten code, because I changed a few things and it's easier to just copy and paste the whole of it:

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Author=minhtrimatrix

[Variables]
Location=FRXX0055
Metric=M
Font=Segoe UI
FontColor=255,255,255,255
FontInactive=255,255,255,200

[bg1]
ImageName=bg1.png
Meter=IMAGE
X=33
Y=38

[bg]
ImageName=bg.png
Meter=IMAGE
X=0
Y=30

[MeasureHour]
Measure=Time
Format=%#H
IfCondition=(#CURRENTSECTION#<3)
IfTrueAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp1"][!SetOption MeterDay2 MeasureName "MeasureWeatherDay1"][!SetOption MeterIcon2 MeasureName "MeasureWeatherNightIcon"][!SetOption MeterTemp3 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay3 MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon2"][!UpdateMeterGroup "Day2"][!UpdateMeterGroup "Day3"][!Redraw]
IfFalseAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay2 MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon2 MeasureName "MeasureWeatherIcon2"][!SetOption MeterTemp3 MeasureName "MeasureWeatherTemp3"][!SetOption MeterDay3 MeasureName "MeasureWeatherDay3"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon3"][!UpdateMeterGroup "Day2"][!UpdateMeterGroup "Day3"][!Redraw]

;--------------

[Current]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0&locale=fr_FR
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>.*"
DynamicVariables=1

[Today]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1&locale=fr_FR
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

[Tomorrow]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2&locale=fr_FR
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

[DayAfter]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3&locale=fr_FR
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

;----------------

[MeasureWeatherTemp]
Measure=WebParser
Url=[Current]
StringIndex=17

[MeasureWeatherDesc]
Measure=WebParser
Url=[Current]
StringIndex=19
Substitute=" And ":" and ","Lgt.":"Light ","Snow/":"Snow & "

[MeasureWeatherIcon]
Measure=WebParser
Url=[Current]
StringIndex=20

[MeasureWeatherRealFeel]
Measure=WebParser
Url=[Current]
StringIndex=18

;------------------

[MeasureWeatherDesc1]
Measure=WebParser
Url=[Today]
StringIndex=9
Substitute=" And ":" and "

[MeasureWeatherDay1]
Measure=WebParser
Url=[Today]
StringIndex=2

[MeasureWeatherTemp1]
Measure=WebParser
Url=[Today]
StringIndex=4
Substitute="N/A":"666"

[MeasureWeatherIcon1]
Measure=WebParser
Url=[Today]
StringIndex=8

[CheckNATemp]
Measure=Calc
Formula=[MeasureWeatherTemp1]
IfBelowValue=665
IfBelowAction=[!HideMeter MeterNightTemp1][!HideMeter MeterNightDay1][!HideMeter MeterNightDesc1][!HideMeter MeterNightIcon1][!ShowMeter MeterTemp1][!ShowMeter MeterDay1][!ShowMeter MeterDesc1][!ShowMeter MeterIcon1]
IfEqualValue=666
IfEqualAction=[!HideMeter MeterTemp1][!HideMeter MeterDay1][!HideMeter MeterDesc1][!HideMeter MeterIcon1][!ShowMeter MeterNightTemp1][!ShowMeter MeterNightDay1][!ShowMeter MeterNightDesc1][!ShowMeter MeterNightIcon1]
DynamicVariables=1

;----------------

[MeasureWeatherNightDesc]
Measure=WebParser
Url=[Today]
StringIndex=18
Substitute=" And ":" and "

[MeasureWeatherNightTemp]
Measure=WebParser
Url=[Today]
StringIndex=5

[MeasureWeatherNightIcon]
Measure=WebParser
Url=[Today]
StringIndex=17

;-----------------

[MeasureWeatherDesc2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=8
Substitute=" And ":" and "

[MeasureWeatherDay2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=3

[MeasureWeatherIcon2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=7

;------------------

[MeasureWeatherDesc3]
Measure=WebParser
Url=[DayAfter]
StringIndex=8
Substitute=" And ":" and "

[MeasureWeatherDay3]
Measure=WebParser
Url=[DayAfter]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp3]
Measure=WebParser
Url=[DayAfter]
StringIndex=3

;D+3, weather icon, id=38
[MeasureWeatherIcon3]
Measure=WebParser
Url=[DayAfter]
StringIndex=7

;-------------

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=68
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C

[MeterDesc]
MeasureName=MeasureWeatherDesc
Meter=STRING
X=43
Y=15
FontColor=#FontColor#
FontSize=10
StringAlign=Left
StringStyle=BOLD
FontFace=#Font#
Antialias=1

[MeterDay]
Meter=STRING
X=34
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Left
StringStyle=Bold
FontFace=#Font#
Text=Aujourd'hui
Antialias=1

[MeterIcon]
MeasureName=MeasureWeatherIcon
Meter=IMAGE
X=41
Y=58

;------------

[MeterTemp2]
Meter=STRING
X=142
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C
Group=Day2

[MeterDay2]
Meter=STRING
X=141
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1
Group=Day2

[MeterIcon2]
Meter=IMAGE
X=114
Y=58
Group=Day2

;------------

[MeterTemp3]
Meter=STRING
X=212
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C
Group=Day3

[MeterDay3]
Meter=STRING
X=211
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1
Group=Day3

[MeterIcon3]
Meter=IMAGE
X=185
Y=58
Group=Day3
I made a few updates of the code as well. I removed the deprecated !Rainmeter... bang prefixes and the !Execute bangs, moved the Author option from the [Rainmeter] section (where it is also deprecated) to [Metadata], replaced the Measure=Plugin and Plugin=Plugins\WebParser.dll options with Measure=WebParser and so on.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

First of all, thanks (again !) for your help :)

That being said, visually the new code doesn't seem to change anything.
I have replaced the code, then refreshed the skin, but during the night I still see [Night] [Tomorrow] [Day After] instead of [Night] [Today] [Tomorrow].

I see what you tried to do in [MeasureHour] with IfCondition=(#CURRENTSECTION#<3), but I don't see what #CURRENTSECTION#<3 means. I guess the problem may be in that part, because if the new code doesn't seem to change anything at night (it's 4 AM right now), it probably means that the condition isn't met...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:That being said, visually the new code doesn't seem to change anything.
I have replaced the code, then refreshed the skin, but during the night I still see [Night] [Tomorrow] [Day After] instead of [Night] [Today] [Tomorrow].

I see what you tried to do in [MeasureHour] with IfCondition=(#CURRENTSECTION#<3), but I don't see what #CURRENTSECTION#<3 means. I guess the problem may be in that part, because if the new code doesn't seem to change anything at night (it's 4 AM right now), it probably means that the condition isn't met...
The idea was to set the meters to show something before a well set moment and something else after that moment.
#CURRENTSECTION# means the section where this variable is posted, ([MeasureHour]). So, in this case IfCondition=(#CURRENTSECTION#<3) means before three o'clock. Before 3 the IfTrueAction is executed, after 3, the IfFalseAction. At 4 AM, we get back the old code, so yep at that hour you get [Night] [Tomorrow] [Day After]. You get [Night] [Today] [Tomorrow] before 3 AM.
I arbitrarily chosen the three o'clock (and forgot to mention this). Had no idea what moment to choose. If it's not good, try to increase the numeric value and retry the code. For example for IfCondition=(#CURRENTSECTION#<8) the IfTrueAction will be executed up to 8 o'clock in the morning and the IfFalseAction after this moment.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Ah, I understand better now ! I will try again tonight. :great:

Question to perfect it : instead of linking the condition only to the hour (which makes difficult to choose a precise hour : 3 AM ? 6 AM ?), could it be linked too to the fact that it's night time ? (night icon, etc.)

The condition could be something like : IF hour < 12 (arbitrary, we need to set a limit because when hour = 22 it's night time too, lol) AND it's night time, THEN display [current] [today] [tomorrow] ELSE display [current] [tomorrow] [day after].

That would be the best, because as you know night time varies according to the time of the year. ;)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:Question to perfect it : instead of linking the condition only to the hour (which makes difficult to choose a precise hour : 3 AM ? 6 AM ?), could it be linked too to the fact that it's night time ? (night icon, etc.)

The condition could be something like : IF hour < 12 (arbitrary, we need to set a limit because when hour = 22 it's night time too, lol) AND it's night time, THEN display [current] [today] [tomorrow] ELSE display [current] [tomorrow] [day after].
As weather.com provides the Sunrise and Sunset too, I suppose it is possible. I'll take a look a bit later today and (probably) will come back with a solution.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Thank you very much :) Then the "ideal" condition would become :

IF hour < Sunrise THEN display [current] [today] [tomorrow] ELSE display [current] [tomorrow] [day after].

For the record here's the last version of the code (I've made small aesthetic changes, nothing big, barely coordinates). Please note that for translation purposes I've had to put the same big "substitute" string in 5 different positions ! I think that's not very efficient, lol.

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Author=minhtrimatrix

[Variables]
Location=FRXX0055
Metric=M
Font=Segoe UI
FontColor=255,255,255,255
FontInactive=255,255,255,200

[bg1]
ImageName=bg1.png
Meter=IMAGE
X=33
Y=38

[bg]
ImageName=bg.png
Meter=IMAGE
X=0
Y=30

[MeasureHour]
Measure=Time
Format=%#H
IfCondition=(#CURRENTSECTION#<6)
IfTrueAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp1"][!SetOption MeterDay2  MeasureName "MeasureWeatherDay1"][!SetOption MeterIcon2 MeasureName "MeasureWeatherNightIcon"][! SetOption MeterTemp3 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay3 MeasureName  "MeasureWeatherDay2"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon2"][!UpdateMeterGroup  "Day2"][!UpdateMeterGroup "Day3"][!Redraw]
IfFalseAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay2  MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon2 MeasureName "MeasureWeatherIcon2"][! SetOption MeterTemp3 MeasureName "MeasureWeatherTemp3"][!SetOption MeterDay3 MeasureName  "MeasureWeatherDay3"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon3"][!UpdateMeterGroup  "Day2"][!UpdateMeterGroup "Day3"][!Redraw]

;--------------

[Current]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0&locale=fr_FR
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>.*"
DynamicVariables=1

[Today]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1&locale=fr_FR
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*) </low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*) </t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*) </ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*) </s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*) </hmid>.*"
DynamicVariables=1

[Tomorrow]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2&locale=fr_FR
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*) </sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*) </s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*) </hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d> (.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

[DayAfter]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3&locale=fr_FR
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*) </sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*) </s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*) </hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d> (.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

;----------------

[MeasureWeatherTemp]
Measure=WebParser
Url=[Current]
StringIndex=17

[MeasureWeatherDesc]
Measure=WebParser
Url=[Current]
StringIndex=19
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger",  "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy  Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige",  Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage",  "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"

[MeasureWeatherIcon]
Measure=WebParser
Url=[Current]
StringIndex=20

[MeasureWeatherRealFeel]
Measure=WebParser
Url=[Current]
StringIndex=18

;------------------

[MeasureWeatherDesc1]
Measure=WebParser
Url=[Today]
StringIndex=9
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger",  "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy  Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige",  Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage",  "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherDay1]
Measure=WebParser
Url=[Today]
StringIndex=2

[MeasureWeatherTemp1]
Measure=WebParser
Url=[Today]
StringIndex=4
Substitute="N/A":"666"

[MeasureWeatherIcon1]
Measure=WebParser
Url=[Today]
StringIndex=8

[CheckNATemp]
Measure=Calc
Formula=[MeasureWeatherTemp1]
IfBelowValue=665
IfBelowAction=[!HideMeter MeterNightTemp1][!HideMeter MeterNightDay1][!HideMeter MeterNightDesc1][! HideMeter MeterNightIcon1][!ShowMeter MeterTemp1][!ShowMeter MeterDay1][!ShowMeter MeterDesc1][! ShowMeter MeterIcon1]
IfEqualValue=666
IfEqualAction=[!HideMeter MeterTemp1][!HideMeter MeterDay1][!HideMeter MeterDesc1][!HideMeter  MeterIcon1][!ShowMeter MeterNightTemp1][!ShowMeter MeterNightDay1][!ShowMeter MeterNightDesc1][! ShowMeter MeterNightIcon1]
DynamicVariables=1

;----------------

[MeasureWeatherNightDesc]
Measure=WebParser
Url=[Today]
StringIndex=18
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger",  "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy  Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige",  Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage",  "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherNightTemp]
Measure=WebParser
Url=[Today]
StringIndex=5

[MeasureWeatherNightIcon]
Measure=WebParser
Url=[Today]
StringIndex=17

;-----------------

[MeasureWeatherDesc2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=8
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger",  "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy  Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige",  Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage",  "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherDay2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday": "Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=3

[MeasureWeatherIcon2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=7

;------------------

[MeasureWeatherDesc3]
Measure=WebParser
Url=[DayAfter]
StringIndex=8
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger",  "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy  Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige",  Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage",  "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherDay3]
Measure=WebParser
Url=[DayAfter]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday": "Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp3]
Measure=WebParser
Url=[DayAfter]
StringIndex=3

;D+3, weather icon, id=38

[MeasureWeatherIcon3]
Measure=WebParser
Url=[DayAfter]
StringIndex=7

;-------------

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=66
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C

[MeterDesc]
MeasureName=MeasureWeatherDesc
Meter=STRING
X=66
Y=12
FontColor=#FontColor#
FontSize=10
StringAlign=Center
StringStyle=BOLD
FontFace=#Font#
Antialias=1

[MeterDay]
Meter=STRING
X=66
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringStyle=Bold
FontFace=#Font#
Text=Maintenant
Antialias=1

[MeterIcon]
MeasureName=MeasureWeatherIcon
Meter=IMAGE
X=41
Y=58

;------------

[MeterTemp2]
Meter=STRING
X=138
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C
Group=Day2

[MeterDay2]
Meter=STRING
X=138
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1
Group=Day2

[MeterIcon2]
Meter=IMAGE
X=113
Y=58
Group=Day2

;------------

[MeterTemp3]
Meter=STRING
X=210
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C
Group=Day3

[MeterDay3]
Meter=STRING
X=210
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1
Group=Day3

[MeterIcon3]
Meter=IMAGE
X=185
Y=58
Group=Day3
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:Thank you very much :) Then the "ideal" condition would become :

IF hour < Sunrise THEN display [current] [today] [tomorrow] ELSE display [current] [tomorrow] [day after].
Ok. Replace the [MeasureHour] measure with the following one:

Code: Select all

[MeasureHour]
Measure=Time
Format=%#H.%M
IfCondition=(#CURRENTSECTION#<[MeasureSunrise])
IfTrueAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp1"][!SetOption MeterDay2 MeasureName "MeasureWeatherDay1"][!SetOption MeterIcon2 MeasureName "MeasureWeatherNightIcon"][!SetOption MeterTemp3 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay3 MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon2"][!UpdateMeterGroup "Day2"][!UpdateMeterGroup "Day3"][!Redraw]
IfFalseAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay2 MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon2 MeasureName "MeasureWeatherIcon2"][!SetOption MeterTemp3 MeasureName "MeasureWeatherTemp3"][!SetOption MeterDay3 MeasureName "MeasureWeatherDay3"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon3"][!UpdateMeterGroup "Day2"][!UpdateMeterGroup "Day3"][!Redraw]
DynamicVariables=1
See that this time the measure returns the time as a decimal number, where the integer part will be the hour and the fractional part will be the minute. The separator is a decimal dot. This detail makes that the returned value can be used as a number.
The above measure needs the moment of Sunrise, which will be given by the [MeasureSunrise] measure. This measure doesn't exist, so it have to be added. Add it (I added it right after the [MeasureWeatherNightIcon] measure, but finally doesn't matter where you add it):

Code: Select all

[MeasureSunrise]
Measure=WebParser
Url=[Today]
StringIndex=6
Substitute=":":"."
The Substitute option converts the returned value to a number, replacing the colon with a dot. This way the Sunrise become a number and it is used into the IfCondition option of the [MeasureHour] measure. The only detail which has to be known is that the substituted value has to be converted to number, which is done by the fact that I added the brackets to it. This also requires to set the dynamic variables (through the DynamicVariables=1 option).
Please test the code and let me know how does it work.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

So, I have added all your changes. Here's a first screenshot @ 1 AM :

Image

As you can see :
  • The good news is that the 3 columns show indeed "Now", "Today" and "Tomorrow" (now, tuesday and wednesday)
  • Wednesday column is OK (both day name, icon, and temp)
  • But tuesday column is not OK (day isn't translated / icon shows "night" instead of "day" / temp is night temp, not day temp)
The icon problem seems to come from this part :
IfCondition=(#CURRENTSECTION#<[MeasureSunrise])
IfTrueAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp1"][!SetOption MeterDay2 MeasureName "MeasureWeatherDay1"][!SetOption MeterIcon2 MeasureName "MeasureWeatherNightIcon"][!SetOption MeterTemp3 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay3 MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon2"][!UpdateMeterGroup "Day2"][!UpdateMeterGroup "Day3"][!Redraw]
So I've tried to replace MeasureWeatherNightIcon with MeasureWeatherIcon1. But when I do, then the skin shows nothing (I have tried several times between 1 AM and 2 AM I guess, here's a second screenshot) :

Image

Here is the current skin code :

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Author=minhtrimatrix

[Variables]
Location=FRXX0055
Metric=M
Font=Segoe UI
FontColor=255,255,255,255
FontInactive=255,255,255,200

[bg1]
ImageName=bg1.png
Meter=IMAGE
X=33
Y=38

[bg]
ImageName=bg.png
Meter=IMAGE
X=0
Y=30

[MeasureHour]
Measure=Time
Format=%#H.%M
IfCondition=(#CURRENTSECTION#<[MeasureSunrise])
IfTrueAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp1"][!SetOption MeterDay2 MeasureName "MeasureWeatherDay1"][!SetOption MeterIcon2 MeasureName "MeasureWeatherIcon1"][!SetOption MeterTemp3 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay3 MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon2"][!UpdateMeterGroup "Day2"][!UpdateMeterGroup "Day3"][!Redraw]
IfFalseAction=[!SetOption MeterTemp2 MeasureName "MeasureWeatherTemp2"][!SetOption MeterDay2 MeasureName "MeasureWeatherDay2"][!SetOption MeterIcon2 MeasureName "MeasureWeatherIcon2"][!SetOption MeterTemp3 MeasureName "MeasureWeatherTemp3"][!SetOption MeterDay3 MeasureName "MeasureWeatherDay3"][!SetOption MeterIcon3 MeasureName "MeasureWeatherIcon3"][!UpdateMeterGroup "Day2"][!UpdateMeterGroup "Day3"][!Redraw]
DynamicVariables=1

;--------------

[Current]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0&locale=fr_FR
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>.*"
DynamicVariables=1

[Today]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1&locale=fr_FR
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

[Tomorrow]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2&locale=fr_FR
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

[DayAfter]
Measure=WebParser
UpdateRate=3000
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3&locale=fr_FR
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
DynamicVariables=1

;----------------

[MeasureWeatherTemp]
Measure=WebParser
Url=[Current]
StringIndex=17

[MeasureWeatherDesc]
Measure=WebParser
Url=[Current]
StringIndex=19
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger", "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige", Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage", "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"

[MeasureWeatherIcon]
Measure=WebParser
Url=[Current]
StringIndex=20

[MeasureWeatherRealFeel]
Measure=WebParser
Url=[Current]
StringIndex=18

;------------------

[MeasureWeatherDesc1]
Measure=WebParser
Url=[Today]
StringIndex=9
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger", "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige", Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage", "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherDay1]
Measure=WebParser
Url=[Today]
StringIndex=2

[MeasureWeatherTemp1]
Measure=WebParser
Url=[Today]
StringIndex=4
Substitute="N/A":"666"

[MeasureWeatherIcon1]
Measure=WebParser
Url=[Today]
StringIndex=8

[CheckNATemp]
Measure=Calc
Formula=[MeasureWeatherTemp1]
IfBelowValue=665
IfBelowAction=[!HideMeter MeterNightTemp1][!HideMeter MeterNightDay1][!HideMeter MeterNightDesc1][!HideMeter MeterNightIcon1][!ShowMeter MeterTemp1][!ShowMeter MeterDay1][!ShowMeter MeterDesc1][!ShowMeter MeterIcon1]
IfEqualValue=666
IfEqualAction=[!HideMeter MeterTemp1][!HideMeter MeterDay1][!HideMeter MeterDesc1][!HideMeter MeterIcon1][!ShowMeter MeterNightTemp1][!ShowMeter MeterNightDay1][!ShowMeter MeterNightDesc1][!ShowMeter MeterNightIcon1]
DynamicVariables=1

;----------------

[MeasureWeatherNightDesc]
Measure=WebParser
Url=[Today]
StringIndex=18
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger", "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige", Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage", "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherNightTemp]
Measure=WebParser
Url=[Today]
StringIndex=5

[MeasureWeatherNightIcon]
Measure=WebParser
Url=[Today]
StringIndex=17

;-----------------

[MeasureSunrise]
Measure=WebParser
Url=[Today]
StringIndex=6
Substitute=":":"."

;-----------------

[MeasureWeatherDesc2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=8
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger", "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige", Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage", "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherDay2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=3

[MeasureWeatherIcon2]
Measure=WebParser
Url=[Tomorrow]
StringIndex=7

;------------------

[MeasureWeatherDesc3]
Measure=WebParser
Url=[DayAfter]
StringIndex=8
Substitute="Beau":"Beau Temps", "Lgt.Clouds":"Nuages Légers", "Lgt.Fog":"Brouillard Léger", "Lgt.Rain":"Pluie Légère", "Lgt.Snow","Neige Légère", "Heavy Clouds":"Couvert", "Heavy Fog":"Brouillard Epais", "Heavy Rain", "Grosse Pluie", "Heavy Snow":"Grosse Neige", Clouds":"Nuages", "Cloudy":"Nuageux", "Fog":"Brouillard", "Rain":"Pluie", "Thunderstorm":"Orage", "Storm":"Orage", "Snow":"Neige", " And ":" et ", "/":" & "

;Déjà vus : "Beau Temps", "Nuageux"


[MeasureWeatherDay3]
Measure=WebParser
Url=[DayAfter]
StringIndex=1
Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi"

[MeasureWeatherTemp3]
Measure=WebParser
Url=[DayAfter]
StringIndex=3

;D+3, weather icon, id=38

[MeasureWeatherIcon3]
Measure=WebParser
Url=[DayAfter]
StringIndex=7

;-------------

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=66
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C

[MeterDesc]
MeasureName=MeasureWeatherDesc
Meter=STRING
X=66
Y=12
FontColor=#FontColor#
FontSize=10
StringAlign=Center
StringStyle=BOLD
FontFace=#Font#
Antialias=1

[MeterDay]
Meter=STRING
X=66
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringStyle=Bold
FontFace=#Font#
Text=Maintenant
Antialias=1

[MeterIcon]
MeasureName=MeasureWeatherIcon
Meter=IMAGE
X=41
Y=58

;------------

[MeterTemp2]
Meter=STRING
X=138
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C
Group=Day2

[MeterDay2]
Meter=STRING
X=138
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1
Group=Day2

[MeterIcon2]
Meter=IMAGE
X=113
Y=58
Group=Day2

;------------

[MeterTemp3]
Meter=STRING
X=210
Y=118
FontColor=#FontColor#
StringStyle=Bold
FontSize=12
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,80
FontFace=#Font#
Antialias=1
Postfix=°C
Group=Day3

[MeterDay3]
Meter=STRING
X=210
Y=40
FontColor=255,255,255,220
FontSize=8
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,0
StringStyle=Bold
FontFace=#Font#
Antialias=1
Group=Day3

[MeterIcon3]
Meter=IMAGE
X=185
Y=58
Group=Day3
------------------------------

EDIT : this is weird ! It's 3:50 AM now (I know, I'm a night owl :D ), and look ! The MeasureWeatherIcon1 icon has finally appeared, without me doing ANYTHING ! :17what

Image

Only the second column's name remains in english for unknown reasons...

I guess this requires a bit more testing. I'll keep watching over the next 48 hours and report afterwards. ;)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:
  • But tuesday column is not OK (day isn't translated / icon shows "night" instead of "day" / temp is night temp, not day temp)
To translate it add the Substitute="Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi" option to the [MeasureWeatherDay1] measure. It's missing there.
Jose Hidalgo wrote:So I've tried to replace MeasureWeatherNightIcon with MeasureWeatherIcon1. But when I do, then the skin shows nothing (I have tried several times between 1 AM and 2 AM I guess,
This is caused by the fact that over night weather.com doesn't return a "day" icon, just a night one. That's why I used that one. Unfortunately I can't have a solution for this.
Jose Hidalgo wrote:EDIT : this is weird ! It's 3:50 AM now (I know, I'm a night owl :D ), and look ! The MeasureWeatherIcon1 icon has finally appeared, without me doing ANYTHING !
Probably at that moment weather.com has posted the icon. I suppose...
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Thanks ! We're getting close to the optimal solution I guess. :)
balala wrote:This is caused by the fact that over night weather.com doesn't return a "day" icon, just a night one. That's why I used that one. Unfortunately I can't have a solution for this.
In that case, could this be done with Rainmeter ?
  • 1h before midnight, store the number of the "day" icon given by weather.com for "tomorrow" in a variable
  • Between midnight and sunrise, use that variable to display the relevant "day" icon for "today"