It is currently May 20th, 2022, 11:40 am

Turning day of the week into picture?

General topics related to Rainmeter.
anthropaulogy
Posts: 2
Joined: July 14th, 2010, 6:39 pm

Turning day of the week into picture?

Post by anthropaulogy »

I am creating a somewhat more artistic rainmeter theme than I usually do and I would really like to be able to control the date more than what rainmeter provides. Is there any way to use a graphic in place of the standard text to show the day of the week?
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Turning day of the week into picture?

Post by Chewtoy »

[MeasureDay]
Measure=Time
Format=%a

[ImageDay]
Meter=Image
MeasureName=MeasureDay
ImageName=%1.jpg
I don't think, therefore I'm not.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Turning day of the week into picture?

Post by poiru »

Chewtoy wrote:[MeasureDay]
Measure=Time
Format=%a

[ImageDay]
Meter=Image
MeasureName=MeasureDay
ImageName=%1.jpg
That won't work. %1, %2, etc. can only be used in Text= and ToolTipText=.

Try:

Code: Select all

[MeasureDay]
Measure=Time
Format=%a

[ImageDay]
Meter=Image
ImageName=[MeasureDay].jpg
DynamicVariables=1
[MeasureDay] will return the abbreviated weekday name (Mon, Tue, etc.). Use %A for full weekday name.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Turning day of the week into picture?

Post by smurfier »

Chewtoy wrote:[MeasureDay]
Measure=Time
Format=%a

[ImageDay]
Meter=Image
MeasureName=MeasureDay
ImageName=%1.jpg
I use that method quite frequently without problems. I even got the method from JSMorley.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Turning day of the week into picture?

Post by poiru »

smurfier wrote: I use that method quite frequently without problems. I even got the method from JSMorley.
So it seems. However, ImageName=%1.jpg has no effect (and is invalid). So I wasn't completely wrong ;)
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Turning day of the week into picture?

Post by Kaelri »

(It'd be really great if we could combine measure values with other text in an ImageName...)
User avatar
JamesAC
Developer
Posts: 318
Joined: July 14th, 2009, 5:57 pm

Re: Turning day of the week into picture?

Post by JamesAC »

How about:

Code: Select all

[MeasureDay]
Measure=Time
Format=%a.jpg

[ImageDay]
Meter=Image
ImageName=%1
I think that should work, unless it gets upset about the . in the time format string
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Quis custodiet ipsos custodes?
User avatar
spx
Developer
Posts: 686
Joined: August 15th, 2009, 2:41 pm
Location: Osaka, JPN

Re: Turning day of the week into picture?

Post by spx »

Kaelri wrote:(It'd be really great if we could combine measure values with other text in an ImageName...)
I'd consider that.
User avatar
GhostMatrix
Rainmeter Sage
Posts: 141
Joined: April 18th, 2009, 8:26 pm
Location: Montreal, Quebec, Canada 45.5658°N, 73.5898°W UTC -5

Re: Turning day of the week into picture?

Post by GhostMatrix »

@anthropaulogy

If you use Png images, you could do it this way

[MeasureDay]
Measure=Time
Format=%A

[ImageDay]
Meter=Image
MeasureName=MeasureDay

Rainmeter will search the image Png of the value in the skin folder , (Friday.png for an example)

If you have Jpg images you can easily convert them in Png, or use the "JamesAC" way by adding .jpg in the time Format

[MeasureDay]
Measure=Time
Format=%A.jpg

[ImageDay]
Meter=Image
MeasureName=MeasureDay

You could also use the solution from "Poiru"

GM
If at first you don't succeed; call it version 0.1

Image