Hi All -
If possible I will create post in Skins Help forum. I will use a weather skin for an example. Can a skin be configured to display a sun image for, say, 06:00 to 18:00 and a moon image for 18:01 to 05:59?
-thx
It is currently April 19th, 2024, 10:21 pm
Image Change Via Time?
-
- Posts: 287
- Joined: June 12th, 2016, 2:40 am
-
- Rainmeter Sage
- Posts: 16147
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Image Change Via Time?
It definitely is. You need a Time measure, with a proper IfCondition. For instance:MourningStar wrote: ↑May 14th, 2022, 5:02 pm Can a skin be configured to display a sun image for, say, 06:00 to 18:00 and a moon image for 18:01 to 05:59?
Code: Select all
[MeasureTime]
Measure=Time
Format=%#H
IfCondition=((#CURRENTSECTION#>=6)&&(#CURRENTSECTION#<18))
IfTrueAction=[!SetOption MeterImage ImageName "#@#SunImage"][!UpdateMeter "MeterImage"][!Redraw]
IfFalseAction=[!SetOption MeterImage ImageName "#@#MoonImage"][!UpdateMeter "MeterImage"][!Redraw]
-
- Posts: 287
- Joined: June 12th, 2016, 2:40 am
Re: Image Change Via Time?
thank you balala - is there a skin that does this so I may study the code and see if I can create this functionality with one of mine on my own?
-
- Rainmeter Sage
- Posts: 16147
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Image Change Via Time?
There probably is (in fact for sure is), but I can't recommend one. But starting from the posted code, you can modify it as you want or you can come back if further questions arise.MourningStar wrote: ↑May 14th, 2022, 8:31 pm is there a skin that does this so I may study the code and see if I can create this functionality with one of mine on my own?
-
- Posts: 287
- Joined: June 12th, 2016, 2:40 am
Re: Image Change Via Time?
ok, I will go for it!