It is currently September 29th, 2024, 1:30 pm

trying to "light" a week day unsuccessful

General topics related to Rainmeter.
Morderisk
Posts: 1
Joined: June 12th, 2014, 6:40 pm

trying to "light" a week day unsuccessful

Post by Morderisk »

I'm new on rainmeter and i'm trying new things on it, but this one is a challenge for me.

I'm trying to use

IfEqualAction=[!SetOption "Weekday" StringStyle Bold][!Redraw]

to change the day of the week string style into Bold from Normal to "light" it. I'm trying things like IfEqualValue=X (X= a week day between 0 and 6 from Measure=Time - Format =%w), but unsuccessful.

I'm trying to do something like this: Imagine that now is Thursday, what i want is to light only Thursday, and when Friday comes, it'll be back to normal and friday will be lighted.

looks like:

Sun Mon Tue Wed Thu Fri Sat -> day change -> Sun Mon Tue Wed Thu Fri Sat

Here is the configuration i'm using so far.

----------------------------------------------------------------------------------------
WeekStyle] ; ¿äÀÏ
X=#Length#r
Y=r
FontColor=255,0,0,160
FontFace=#FontFace1#
FontSize=8
StringAlign=Center
StringStyle=Normal
AntiAlias=1
DynamicVariables=1

[mWeekCode]
Measure=Time
Format=%w

;----Week Label----
[Sunday]
Meter=String
MeterStyle=WeekStyle
Text=Sun
X=(#Length#/2)
Y=(#Length#-16)
DynamicVariables=1

[Monday]
Meter=String
MeterStyle=WeekStyle
Text=Mon

[Tueday]
Meter=String
MeterStyle=WeekStyle
Text=Tue

[Wedday]
Meter=String
MeterStyle=WeekStyle
Text=Wed

[Thuday]
Meter=String
MeterStyle=WeekStyle
Text=Thu

[Friday]
Meter=String
MeterStyle=WeekStyle
Text=Fri

[Satday]
Meter=String
MeterStyle=WeekStyle
Text=Sat
----------------------------------------------------------------------------------------
User avatar
Mordasius
Posts: 1178
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: trying to "light" a week day unsuccessful

Post by Mordasius »

One way to do this would be to add the following measure and meter to the bottom of the .ini file.

Code: Select all

;---  Highlight Today  ---
[mToday]
Measure=Time
Format=%a

[HiLightDay]
Meter=String
MeasureName=mToday
MeterStyle=WeekStyle
X=( (#Length#/2) + ( #Length# * [mWeekCode:] ) )
StringStyle=Bold
User avatar
Active Colors
Moderator
Posts: 1316
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: trying to "light" a week day unsuccessful

Post by Active Colors »

Try this one. At least it works fine for me:

Code: Select all

[MSRDay]
Measure=Time
Format=%A
IfMatch=Monday
IfMatchAction=[!WriteKeyValue TIMEWeekday1TR FontColor "250,250,250,255"][!WriteKeyValue TIMEWeekday2TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday3TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday4TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday5TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday6TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday7TR FontColor "250,250,250,100"][!Redraw]
IfMatch2=Tuesday
IfMatchAction2=[!WriteKeyValue TIMEWeekday1TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday2TR FontColor "250,250,250,255"][!WriteKeyValue TIMEWeekday3TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday4TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday5TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday6TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday7TR FontColor "250,250,250,100"][!Redraw]
IfMatch3=Wednesday
IfMatchAction3=[!WriteKeyValue TIMEWeekday1TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday2TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday3TR FontColor "250,250,250,255"][!WriteKeyValue TIMEWeekday4TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday5TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday6TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday7TR FontColor "250,250,250,100"][!Redraw]
IfMatch4=Thursday
IfMatchAction4=[!WriteKeyValue TIMEWeekday1TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday2TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday3TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday4TR FontColor "250,250,250,255"][!WriteKeyValue TIMEWeekday5TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday6TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday7TR FontColor "250,250,250,100"][!Redraw]
IfMatch5=Friday
IfMatchAction5=[!WriteKeyValue TIMEWeekday1TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday2TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday3TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday4TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday5TR FontColor "250,250,250,255"][!WriteKeyValue TIMEWeekday6TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday7TR FontColor "250,250,250,100"][!Redraw]
IfMatch6=Saturday
IfMatchAction6=[!WriteKeyValue TIMEWeekday1TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday2TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday3TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday4TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday5TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday6TR FontColor "250,250,250,255"][!WriteKeyValue TIMEWeekday7TR FontColor "250,250,250,100"][!Redraw]
IfMatch7=Sunday
IfMatchAction7=[!WriteKeyValue TIMEWeekday1TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday2TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday3TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday4TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday5TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday6TR FontColor "250,250,250,100"][!WriteKeyValue TIMEWeekday7TR FontColor "250,250,250,255"][!Redraw]
IfMatchMode=0

[TIMEWeekday1TR]
Meter=String
X=0
Y=0
FontColor=250,250,250,100
FontFace=Calibri
FontSize=8
StringStyle=NORMAL
StringAlign=CENTER
Text="Monday"
AntiAlias=1
DynamicVariables=1

[TIMEWeekday2TR]
Meter=String
X=20R
Y=r
FontColor=250,250,250,100
FontFace=Calibri
FontSize=8
StringStyle=NORMAL
StringAlign=CENTER
Text="Tuesday"
AntiAlias=1
DynamicVariables=1

[TIMEWeekday3TR]
Meter=String
X=20R
Y=r
FontColor=250,250,250,100
FontFace=Calibri
FontSize=8
StringStyle=NORMAL
StringAlign=CENTER
Text="Wednesday"
AntiAlias=1

[TIMEWeekday4TR]
Meter=String
X=20R
Y=r
FontColor=250,250,250,255
FontFace=Calibri
FontSize=8
StringStyle=NORMAL
StringAlign=CENTER
Text="Thursday"
AntiAlias=1
DynamicVariables=1

[TIMEWeekday5TR]
Meter=String
X=20R
Y=r
FontColor=250,250,250,100
FontFace=Calibri
FontSize=8
StringStyle=NORMAL
StringAlign=CENTER
Text="Friday"
AntiAlias=1
DynamicVariables=1

[TIMEWeekday6TR]
Meter=String
X=20R
Y=r
FontColor=250,250,250,100
FontFace=Calibri
FontSize=8
StringStyle=NORMAL
StringAlign=CENTER
Text="Saturday"
AntiAlias=1
DynamicVariables=1

[TIMEWeekday7TR]
Meter=String
X=20R
Y=r
FontColor=250,250,250,100
FontFace=Calibri
FontSize=8
StringStyle=NORMAL
StringAlign=CENTER
Text="Sunday"
AntiAlias=1
DynamicVariables=1
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: trying to "light" a week day unsuccessful

Post by smurfier »

Code: Select all

[WeekStyle]
X=#Length#r
Y=r
FontColor=255,0,0,160
FontFace=#FontFace1#
FontSize=8
StringAlign=Center
AntiAlias=1
Group=Weekday

[mWeekCode]
Measure=Time
Format=%w
OnChangeAction=[!SetOptionGroup Weekday StringStyle Normal][!SetOption Weekday[mWeekCode] StringStyle Bold][!UpdateMeterGroup Weekday][!Redraw]
DynamicVariables=1

;----Week Label----
;Sunday
[Weekday0]
Meter=String
MeterStyle=WeekStyle
Text=Sun
X=(#Length#/2)
Y=(#Length#-16)
DynamicVariables=1

;Monday
[Weekday1]
Meter=String
MeterStyle=WeekStyle
Text=Mon

;Tuesday
[Weekday2]
Meter=String
MeterStyle=WeekStyle
Text=Tue

;Wednesday
[Weekday3]
Meter=String
MeterStyle=WeekStyle
Text=Wed

;Thursday
[Weekday4]
Meter=String
MeterStyle=WeekStyle
Text=Thu

;Friday
[Weekday5]
Meter=String
MeterStyle=WeekStyle
Text=Fri

;Saturday
[Weekday6]
Meter=String
MeterStyle=WeekStyle
Text=Sat
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 . . .