If you use a time measure with a substitution, it will replace %w (the day of the week) with the proper image. So if %w returns
1 (which is usually monday) it will replace that with day1.png. You can also do this with the other time measures. To place the image into your meter, make sure to add DynamicVariables=1 and ImageName=[DayImage] into your meter
Code: Select all
[DayImage]
Measure=Time
Format=%w
Substitute="0":"Sunday.png","1":"Monday.png","2":"Tuesday.png","3":"Wednesday.png","4":"Thursday.png","5":"Friday.png","6":"Saturday.png"
DynamicVariables=1
[MeterDay]
Meter=Image
ImageName=[DayImage]
DynamicVariables=1
NOTE: You can use the substitution on any measure, so you can do this for the month, year and date measures as well.
You can find all the information about the time measure @
http://rainmeter.net/cms/Measures-Time_beta
If you want to display the next few days as images (that aren't highlighted), you'll need some offset measures that will return the next day's value. You can do this by running the time measure through a calc and adding 1 (equal to 1 day). by using this offset version of [CurrentDay], you essentially tell the 2ndDay meter that it is a day later than it really is and it will only display the non-highlighted day images. (day1h.png is the highlighted version of day1.png)
Code: Select all
[DayImage]
Measure=Time
Format=%w
[2ndDay]
Measure=Calc
Formula=[DayImage]=6 ? [DayImage]-6 : [DayImage]+1
Substitute="0":"day0.png","1":"day1.png","2":"day2.png","3":"day3.png","4":"day4.png","5":"day5.png","6":"day6.png"
DynamicVariables=1
[3rdDay]
Measure=Calc
Formula=[DayImage]<4 ? [DayImage]-5 : [DayImage]+2
Substitute="0":"day0.png","1":"day1.png","2":"day2.png","3":"day3.png","4":"day4.png","5":"day5.png","6":"day6.png"
DynamicVariables=1
[CurrentDay]
Measure=Calc
Formula=[DayImage]
Substitute="0":"day0h.png","1":"day1h.png","2":"day2h.png","3":"day3h.png","4":"day4h.png","5":"day5h.png","6":"day6h.png"
[MeterCurrentDay]
Meter=Image
ImageName=[CurrentDay]
X=0r
Y=0r
DynamicVariables=1
[Meter2ndDay]
Meter=Image
ImageName=[2ndDay]
X=0r
Y=0r
DynamicVariables=1
[Meter3rdDay]
Meter=Image
ImageName=[3rdDay]
X=0r
Y=0r
DynamicVariables=1
Because the day measure only allows 0-6, we add an argument that says if DayImage=6, subtract 6, otherwise, add 1 to DayImage. With the 3rd day measure, because we are adding two, we need to make it so that it says if DayImage is higher than 4,
subtract 5, otherwise, add 2.
You would have to add quite a few of these offset meters and measures in order to populate your whole calendar with images, but it would be very worthwhile. A quick word of advice; re-use a measure as often as you can because it will mean only making the meter to display that image again in a different spot. e.g, all the tuesdays on your calendar would be reading from the same measure.
Remember to use the logical arguments on the cals that offset the time reading and when your making the time measures for the day of the month, make sure to use %#d to drop the zero in front. Also, ensure that all the measures you use for time are the decimal version so that it is much easier than adding extra substitutions.
I hope that this helps. By the way, nice skin.
EDIT: I have edited this post so that it includes more accurate information.
Also, here is a list of the time calcs that you should use.
- %#d - Day of month as decimal number (01 – 31)
%#m - Month as decimal number (01 – 12)
%w - Weekday as decimal number (0 – 6; Sunday is 0) (don't add the # because you don't need to drop zero's)
%Y - Year with century, as decimal number
EDIT: Fixed the substitution example