It is currently April 26th, 2024, 3:38 pm

Substitute for event decimal calender

Tips and Tricks from the Rainmeter Community
JackBurton
Posts: 5
Joined: May 9th, 2010, 2:15 am

Substitute for event decimal calender

Post by JackBurton »

Something for the beginner. This may look pretty basic to members familiar with Rainmeter.
If your wanting a simple easy to make event calender you can use the "substitute" as a replacement for a date.

For instance:

Code: Select all

 [MeasureTimeDate]
Measure=Time
Format=%#x
will give you this format "Sunday, May 09, 2010" but if this day is John's Birthday you can substitute:

Code: Select all

 [MeasureTimeDate]
Measure=Time
Format=%#x
 Substitute="Sunday, May 09, 2010":"May 09 - John's Birthday"
Or if your planning on using the same format each year you probably want to attach the substitute to only the May 09 which can be done easy enough:

Substitute="May 09":"May 09 - John's Birthday"

This will look like: Sunday, May 09 - John's Birthday, 2010

You can add each event dividing the events by a comma (,).
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Substitute for event decimal calender

Post by dragonmage »

You've tested this?
JackBurton
Posts: 5
Joined: May 9th, 2010, 2:15 am

Re: Substitute for event decimal calender

Post by JackBurton »

Sorry for not posting response sooner. Yes it works fine. Briefly how "Substitute" works is by replacing a portion or whole part of the output produced by the "measure and meter". The piece being replaced must match exactly what is defined in the "Substitute".

Here's another using substitue:

In this example you can use substitute to create a fancy day or month output. The day is defined twice, in the first definition the day is substituted with only the first letter and the second substitute defines the rest. With this you can change the first letter into any fancy font, size, and color and then follow it with visually easy to read text for the rest of the day.

Code: Select all

[MeasureDay1]
Measure=Time
Format=%A
Substitute="Monday":"M","Tuesday":"T","Wednesday":"W","Thursday":"T","Friday":"F","Saturday":"S","Sunday":"S"

[MeasureDay2]
Measure=Time
Format=%A
Substitute="Monday":"ONDAY","Tuesday":"UESDAY","Wednesday":"EDNESDAY","Thursday":"HURSDAY","Friday":"RIDAY","Saturday":"ATURDAY","Sunday":"UNDAY"

[MeterDay1]
MeasureName=MeasureDay1
Meter=STRING
X=0
Y=70
FontColor=53,30,86, 255
FontSize=50
FontFace=Calibri
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1

[MeterDay2]
MeasureName=MeasureDay2
Meter=STRING
X=0R
Y=95
FontColor=53,130,86, 255
FontSize=30
FontFace=arial
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1