Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1418

Help: Rainmeter Skins • Re: Skin to show random gif except for specific days

$
0
0
but I would also like it to show a specific gif on certain days (e.g. show a Christmas themed gif on Christmas day).
To check the date and show or hide a meter on certain days, you can use a properly set Time measure. For instance:

Code:

[MeasureTime]Measure=TimeFormat=%#m.%dIfCondition=(#CURRENTSECTION#=10.25)IfTrueAction=[!ShowMeter "MyMeter"]IfFalseAction=[!HideMeter "MyMeter"]
The basic idea here is to format the date as a number: Format=%#m.%d. According to this format, the integer part of the returned number is the month, while the decimal part is the day. The used IfCondition checks if the number (value) returned by the measure is equal with 10.25 (date of today - at least when I posted my reply - integer part, 10 is the month, decimal part, 25 is the day): IfCondition=(#CURRENTSECTION#=10.25). The IfCondition is true for one day each year, on other days it is false. Accordingly on the set date, the IfTrueAction is executed, showing the [MyMeter] meter, while on all other days, the IfFalseAction is hiding the same [MyMeter] meter.
Obviously you can use more dates and if the current date match any of them, the condition becomes true and the meter is shown. For this you need more conditions, but this can easily be done: IfCondition=((#CURRENTSECTION#=10.25)||(#CURRENTSECTION#=10.26)). In this case the IfTrueAction is executed on both dates, October 25th and October 26th and on the other days IfFalseAction is executed.
I didn't add the code of the Image meter, hope the question is not related to this. However, let us know if it is.

Statistics: Posted by balala — Yesterday, 8:36 pm



Viewing all articles
Browse latest Browse all 1418

Trending Articles