I have a clock, date and weather skin which shows the temperature from openweatherapi, now I want it to show an icon depending on the weather condition, I already have the images (https://i.imgur.com/qh5HGwt.png), and I already figured out how to pull the condition and clouds data with regex
What I'm lacking is how to assign different icons for different conditions, for example if weather = light rain, show icon for rain, if clouds > 75 show mostly-cloudy icon, etc
This is what I've done until now
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
[Variables]
Color=255,255,255,255
Font=Product Sans Bold
[MeasureTime]
Measure=Time
Format=%H:%M
[MeasureDate]
Measure=Time
Format=%A, %B %d
FormatLocale=Local
[MeasureWeatherTemp]
Measure=WebParser
URL=*api URL with key*
RegExp=(?siU)\"temp\":(.*)\,
UpdateRate=1800
[MeasureWeatherCondition]
Measure=WebParser
URL=*api URL with key*
RegExp=(?siU)\"description\":\"(.*)\"
UpdateRate=1800
[MeasureWeatherClouds]
Measure=WebParser
URL=*api URL with key*
RegExp=(?siU)\"clouds\":\{\"all\":(.*)\}
UpdateRate=1800
[MeasureTemp]
Measure=Calc
Formula= MeasureWeatherTemp
[Clock]
Meter=String
MeasureName=MeasureTime
X=100
Y=75
W=500
H=300
FontSize=57
FontFace=#Font#
AntiAlias=1
FontColor=#Color#
StringAlign=CenterCenter
InlineSetting=Shadow|2|2|3|35,35,35,110
Text="%1"
[Date]
Meter=String
MeasureName=MeasureDate
X=103
Y=128
W=350
H=200
FontSize=15
FontFace=#Font#
AntiAlias=1
FontColor=#Color#
StringAlign=CenterCenter
InlineSetting=Shadow|2|2|3|35,35,35,110
[WeatherTemp]
Meter=String
MeasureName=MeasureTemp
X=103
Y=165
W=350
H=200
FontSize=15
FontFace=#Font#
AntiAlias=1
FontColor=#Color#
Text=%1 #unitText#
StringAlign=CenterCenter
InlineSetting=Shadow|2|2|3|35,35,35,110
[Icon]
Measure=?
[Meter@CurrentIcon]
Meter=Image
ImageName=#@#WeatherIcons\[Icon].png
X=130
Y=165
W=350
H=200
DynamicVariables=1