It is currently April 28th, 2024, 2:42 pm

How to make %A display the parameters of [MeterDay]

Get help with creating, editing & fixing problems with skins
User avatar
Pyuahowaito
Posts: 50
Joined: January 3rd, 2022, 2:44 pm

How to make %A display the parameters of [MeterDay]

Post by Pyuahowaito »

I want to put [MeasureDay] after [MeasureDate] in the format %Y %m %d %A, but I don't know how to make %A associate the parameters of [MeterDay]. Independent of each other

Code: Select all

[MeasureDate]
Measure=Time
Format=%Y %m %d

[MeasureDay]
Measure=Time
Format=%A
Substitute="Monday":"月曜日","Tuesday":"火曜日","Wednesday":"水曜日","Thursday":"木曜日","Friday":"金曜日","Saturday":"土曜日","Sunday":"日曜日"

[MeterDate]
Meter=STRING
MeasureName=MeasureDate
X=120
Y=110
FontColor=#FontColor#
FontSize=23
FontFace=Antipasto
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1

[MeterDay]
Meter=STRING
MeasureName=MeasureDay
FontColor=#FontColor#
FontSize=18
FontFace=Antipasto
StringStyle=Bold
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1
Last edited by Pyuahowaito on December 21st, 2023, 7:36 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to make %A display the parameters of [MeterDay]

Post by balala »

Pyuahowaito wrote: December 18th, 2023, 6:55 pm I want to put [MeasureDay] after [MeasureDate] in the format %Y %m %d %A, but I don't know how to make %A associate the parameters of [MeterDay]. Independent of each other
Replace the Format option of the [MeasureDate] measure by Format=%Y %m %d %A. Remove the [MeasureDay] measure, along with its dependencies (for instance the [MeterDay] meter). You can either add the Substitute option of the [MeasureDay] measure to [MeasureDate], however an even better solution in my opinion is not to substitute, but ask Rainmeter to return the day names in Japanese (if I'm correct, or in any other language, if I'm not). You can do this by adding the FormatLocale=ja-JP option to the [MeasureDate] measure, in which case the Substitute option is not needed anymore and can be removed.
Another solution is to use only the [MeterDate] meter (if you do this, remove the [MeterDay] meter) and add to it the following option, besides MeasureName: MeasureName2=MeasureDay. Also add a Text=%1 %2 option to the same [MeterDate] meter. In this option %1 means the measure added as MeasureName and %2 the measure added as MeasureName2.
Which of these solutions do you prefer is completely up to you.
User avatar
Yincognito
Rainmeter Sage
Posts: 7179
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make %A display the parameters of [MeterDay]

Post by Yincognito »

balala wrote: December 18th, 2023, 8:27 pm In this option %1 means the measure added as MeasureName1 and %2 the measure added as MeasureName2.
Small note, just to avoid confusion: there isn't a MeasureName1 (or any option with an index of 1, for that matter) in Rainmeter. It's just MeasureName, possibly followed by MeasureName2, MeasureName3, and so on, and this goes for any other option that supports indexing. So, %1 in this case will refer to the measure specified as the value for the MeasureName option. Just in case the OP is just starting out with Rainmeter and this detail isn't obvious. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to make %A display the parameters of [MeterDay]

Post by balala »

Yincognito wrote: December 19th, 2023, 5:57 am there isn't a MeasureName1 (or any option with an index of 1, for that matter) in Rainmeter.
Right! My bad! Once again. Thanks. Fixed my post, just to avoid any possible confusion.
User avatar
Yincognito
Rainmeter Sage
Posts: 7179
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make %A display the parameters of [MeterDay]

Post by Yincognito »

balala wrote: December 19th, 2023, 7:27 am Right! My bad! Once again. Thanks. Fixed my post, just to avoid any possible confusion.
:great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Pyuahowaito
Posts: 50
Joined: January 3rd, 2022, 2:44 pm

Re: How to make %A display the parameters of [MeterDay]

Post by Pyuahowaito »

Thank you for your tips.

I have another question. Is there a way to add different text styles to one of the time formats separately without splitting the time format, like this:(At present, other methods and manual alignment are used to achieve similar results)
2.jpg

And it is aligned with the same format as Format=%Y %m %d %A, with a space between them, and its distance is the same.
1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to make %A display the parameters of [MeterDay]

Post by balala »

Pyuahowaito wrote: December 19th, 2023, 6:11 pm I have another question. Is there a way to add different text styles to one of the time formats separately without splitting the time format, like this:(At present, other methods and manual alignment are used to achieve similar results)2.jpg
And it is aligned with the same format as Format=%Y %m %d %A, with a space between them, and its distance is the same.1.jpg
There definitely is. But first question is which approach did you use? Did you alter the Format of the [MeasureDate] measure or did add two MeasureName options to the [MeterDate] meter? I'm not entirely sure...
User avatar
Pyuahowaito
Posts: 50
Joined: January 3rd, 2022, 2:44 pm

Re: How to make %A display the parameters of [MeterDay]

Post by Pyuahowaito »

balala wrote: December 19th, 2023, 7:06 pm There definitely is. But first question is which approach did you use? Did you alter the Format of the [MeasureDate] measure or did add two MeasureName options to the [MeterDate] meter? I'm not entirely sure...
This is the current code. I don't know how to proceed.

Code: Select all

[Rainmeter]
Update=1500

[MeasureTime]
Measure=Time
Format=%H:%M

[MeasureDate]
Measure=Time
Format=%Y %m %d %A
FormatLocale=ja-JP

[MeterDate]
Meter=STRING
MeasureName=MeasureDate
X=120
Y=110
FontColor=#FontColor#
FontSize=23
FontFace=Antipasto
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1

[MeterDay]
Meter=STRING
MeasureName=MeasureDay
FontColor=#FontColor#
FontSize=18
FontFace=Antipasto
StringStyle=Bold
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: How to make %A display the parameters of [MeterDay]

Post by CodeCode »

Try this out and see if it looks like progress.


Code: Select all

[Rainmeter]
Update=1500

[MeasureTime]
Measure=Time
Format=%H:%M

[MeasureDate]
Measure=Time
Format=%Y %m %d %A
FormatLocale=ja-JP

[MeeasureDay]
Measure=Time
Format=%A

[MeterDate]
Meter=STRING
MeasureName=MeasureDate
X=120
Y=110
FontColor=#FontColor#
FontSize=23
FontFace=Antipasto
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1

[MeterDay]
Meter=STRING
MeasureName=MeasureDay
FontColor=#FontColor#
FontSize=18
FontFace=Antipasto

StringStyle=Bold
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1

Code: Select all

[Spoiler]
[Rainmeter]
Update=1500

[MeasureTime]
Measure=Time
Format=%H:%M

[MeasureDate]
Measure=Time
Format=%Y %m %d %A
FormatLocale=ja-JP

[MeterDate]
Meter=STRING
MeasureName=MeasureDate
X=120
Y=110
FontColor=#FontColor#
FontSize=23
FontFace=Antipasto
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1

[MeterDay]
Meter=STRING
MeasureName=MeasureDay
FontColor=#FontColor#
FontSize=18
FontFace=Antipasto
StringStyle=Bold
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7179
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to make %A display the parameters of [MeterDay]

Post by Yincognito »

Pyuahowaito wrote: December 19th, 2023, 6:11 pm Thank you for your tips.

I have another question. Is there a way to add different text styles to one of the time formats separately without splitting the time format, like this:(At present, other methods and manual alignment are used to achieve similar results)2.jpg
And it is aligned with the same format as Format=%Y %m %d %A, with a space between them, and its distance is the same.1.jpg
You could use the String meter's inline settings, if you want to have different style in the same meter (i.e. MeterDate):
https://docs.rainmeter.net/manual/meters/string/inline/

By the way, you have no MeasureDay in your code, so the meter that references it (i.e. MeterDay) won't display anything of value.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth