InlineSetting for Digital Clock

General topics related to Rainmeter.

InlineSetting for Digital Clock

April 20th, 2017, 3:32 pm
Vetsus
   [12 posts]

what i'm trying to do is have the time set for ##:####

this format would end up as HH:MMSS

what i want is for just the seconds to be a different size, but either i don't understand the docs enough or i'm missing something. i cannot get just the seconds to be a different pattern. in my case i'm trying to make the seconds smaller here:

Code: Select all

[Digital_Time]
Meter=String
MeasureName=MeasureHour
MeasureName2=MeasureMinute
MeasureName3=MeasureSecond
X=(#Scale# * 100)
Y=(#Scale# * 100)
StringAlign=CenterCenter
StringStyle=Bold
StringEffect=Border
FontFace=Arial
FontSize=(#Scale# * 36)
FontColor=#FontColor#,255
FontEffectColor=#FontEffectColor#,255
Text=%1:%2%3
InlineSetting=Size | (#Scale# * 18)
InlinePattern=^(:[/d]{2})
;Hidden=1
User avatar

Re: InlineSetting for Digital Clock

April 20th, 2017, 4:16 pm
balala
Rainmeter Sage   [4325 posts]

Vetsus wrote:what i'm trying to do is have the time set for ##:####

this format would end up as HH:MMSS

what i want is for just the seconds to be a different size, but either i don't understand the docs enough or i'm missing something. i cannot get just the seconds to be a different pattern. in my case i'm trying to make the seconds smaller here:


Try the following options:

Code: Select all

InlineSetting=Size | (#Scale# * 18)
InlinePattern=^\d{1,2}:\d{2}(\d{2})$

The InlinePattern is constructed in the following form: the ^ and $ characters mean the beginning respectively the end of the expression. Between these two, we have three group of digits: the first one has one or two digits (\d{1,2}) and is followed by a colon (:). Then comes two groups of two digits each (\d{2}). From these last two groups, the second one is captured, because it is included into parenthesis. The setting given into the InlineSetting option is applied to this last captured group.
User avatar

Re: InlineSetting for Digital Clock

April 20th, 2017, 4:21 pm
FreeRaider
   [610 posts]

Try this code

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
Scale=2.0

[MeasureHour]
Measure=Time
Format=%H

[MeasureMinute]
Measure=Time
Format=%M

[MeasureSecond]
Measure=Time
Format=%S

[Digital_Time]
Meter=String
MeasureName=MeasureHour
MeasureName2=MeasureMinute
MeasureName3=MeasureSecond
X=(#Scale# * 100)
Y=(#Scale# * 100)
StringAlign=CenterCenter
StringStyle=Bold
StringEffect=Border
FontFace=Arial
FontSize=(#Scale# * 36)
FontColor=#FontColor#,255
FontEffectColor=#FontEffectColor#,255
Text=%1:%2%3
InlineSetting=Size | (#Scale# * 18)
InlinePattern=^.*:\d+(\d{2})$
;Hidden=1



Edit: balala beat me

Re: InlineSetting for Digital Clock

April 20th, 2017, 4:30 pm
Vetsus
   [12 posts]

worked perfectly! thank you very much!
User avatar

Re: InlineSetting for Digital Clock

April 20th, 2017, 4:36 pm
balala
Rainmeter Sage   [4325 posts]

FreeRaider wrote:Edit: balala beat me

Don't worry, it was just a matter of minutes.

Return to “General Discussion”



Who is online

Users browsing this forum: No registered users and 1 guest