Page 1 of 1

Dynamic Text Colors

Posted: March 3rd, 2011, 10:47 pm
by summit
Hi, I was wondering how I can change the color of one word in a sentence. For example, in the following screenshot,


how would I change the color of "5:42" and leave the rest black?

Thanks,
Summit

Re: Dynamic Text Colors

Posted: March 4th, 2011, 2:33 am
by JpsCrazy
Image isn't loading for me..
But chances are you can separate the time from the rest of the string and just make three meters, the first and third being string meters with the actual text and the second being the time.
Post the code for specific help.

Re: Dynamic Text Colors

Posted: March 4th, 2011, 4:25 am
by summit
IMG URL: http://clip2net.com/clip/m45822/1299212564-me-jpg-149kb.jpg


Thats the first method I thought of, but that seemed like a noob method, as it is very clumbersome. Is was searching for another way, such as in HTML, where you can make a word bold:
"the last word in this sentence is <b>bold</b>."

Thanks,
Summit

Re: Dynamic Text Colors

Posted: March 4th, 2011, 4:27 am
by summit
CODE:

Code: Select all

[Rainmeter]
Simplesentence created by WhiteBaron
Update=30000

;----------MEASURES----------

[MeasureTime]
Measure=Time
Format=The time is %#I:%Mz%H
Substitute="z00":" in the morning","z01":" in the morning","z02":" in the morning","z03":" in the morning","z04":" in the morning","z05":" in the morning","z06":" in the morning","z07":" in the morning","z08":" in the morning","z09":" in the morning","z10":" in the morning","z11":" in the morning","z12":" in the afternoon","z13":" in the afternoon","z14":" in the afternoon","z15":" in the afternoon","z16":" in the afternoon","z17":" in the evening","z18":" in the evening","z19":" in the evening","z20":" at night","z21":" at night","z22":" at night","z23":" at night"


[MeasureDate]
Measure=Time
Format=on a %A, the %d day of %B.
Substitute="01":"1st","02":"2nd","03":"3rd","04":"4th","05":"5th","06":"6th","07":"7th","08":"8th","09":"9th","10":"10th","11":"11th","12":"12th","13":"13th","14":"14th","15":"15th","16":"16th","17":"17th","18":"18th","19":"19th","20":"20th","21":"21st","22":"22nd","23":"23rd","24":"24th","25":"25th","26":"26th","27":"27th","28":"28th","29":"29th","30":"30th","31":"31st"

[MeasureYear]
Measure=Time
Format=The year is %Y, and it's awesome!

;----------METERS------------

[MeterTime]
MeasureName=MeasureTime
Meter=String
Y=80
FontColor=0, 0, 0
FontSize=25
FontFace=Journal
StringAlign=Left
AntiAlias=1
Angle=-0.08

[MeterDate]
MeasureName=MeasureDate
Meter=String
X=15
Y=110
FontColor=0, 0, 0
FontSize=25
FontFace=Journal
StringAlign=Left
AntiAlias=1
Angle=-0.08150515

[MeterYear]
MeasureName=MeasureYear
Meter=String
X=15
Y=140
FontColor=0, 0, 0
FontSize=25
FontFace=Journal
StringAlign=Left
StringStyle=Normal
AntiAlias=1
Angle=-0.08150515

Re: Dynamic Text Colors

Posted: March 4th, 2011, 5:42 am
by JpsCrazy
Rainmeter doesn't work like that, sorry to say. Although it'd be interesting if it could.

Even if it were the case, it wouldn't be that simple.
This should work, just change the FontColor of MeterTime1 and delete [MeasureTime] and [MeterTime] in the current .ini. Make sure [MeterTime] is where the old [MeterTime] was.
The x, y, and Angle lines may need some fine tuning if it doesn't look right.

Code: Select all

[MeasureTime1]
Measure=Time
Format=%#I:%M

[MeasureTime2]
Measure=Time
Format=z%H
Substitute="z00":" in the morning","z01":" in the morning","z02":" in the morning","z03":" in the morning","z04":" in the morning","z05":" in the morning","z06":" in the morning","z07":" in the morning","z08":" in the morning","z09":" in the morning","z10":" in the morning","z11":" in the morning","z12":" in the afternoon","z13":" in the afternoon","z14":" in the afternoon","z15":" in the afternoon","z16":" in the afternoon","z17":" in the evening","z18":" in the evening","z19":" in the evening","z20":" at night","z21":" at night","z22":" at night","z23":" at night"


[MeterTime]
Meter=String
Text=The time is
Y=80
FontColor=000000
FontSize=25
FontFace=Journal
StringAlign=Left
AntiAlias=1
Angle=-0.08

[MeterTime1]
Meter=String
MeasureName=MeasureTime1
Text=%1
Y=-14r
X=-10R
FontColor=AAAAAA
FontSize=25
FontFace=Journal
StringAlign=Left
AntiAlias=1
Angle=-0.08

[MeterTime2]
Meter=String
MeasureName=MeasureTime2
Text=%1
Y=-8r
X=-15R
FontColor=000000
FontSize=25
FontFace=Journal
StringAlign=Left
AntiAlias=1
Angle=-0.08