It is currently April 20th, 2024, 1:10 pm

Clock colour change ever so often...

Get help with creating, editing & fixing problems with skins
theory
Posts: 2
Joined: March 3rd, 2010, 7:26 pm

Clock colour change ever so often...

Post by theory »

I use the 10-Foot HUD Clock and was wondering how i can make it so it changes colour at certain times, the reason is i want to be more productive with my time on the computer, so i work for a while then browser for little bit every so often.

Perhaps there is something like this already as im sure i saw the idea somewhere before, also are there any other productivity tools for rainmeter?
DumbDude1994
Posts: 43
Joined: November 12th, 2009, 2:04 am

Re: Clock colour change ever so often...

Post by DumbDude1994 »

Hopefully you can read this if you want to change the color or something like that. If not I can help you. It is set to change from a semi-transparent white to pink when the time is over 3:00 PM

Code: Select all

[Rainmeter]
10-Foot HUD (White) - Created by Stephen R Gibson.

;Metadata added by RainBrowser
;http://rainmeter.net/RainWiki/index.php?title=Rainmeter_101#.5BMetadata.5D

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

[MeasureTime]
Measure=Time
Format=%#I:%M %p

[MeasureDate]
Measure=Time
Format=%d

[MeasureMonth]
Measure=Time
Format=%B
Substitute="January":"JANUARY","February":"FEBRUARY","March":"MARCH","April":"APRIL","May":"MAY","June":"JUNE","July":"JULY","August":"AUGUST","September":"SEPTEMBER","October":"OCTOBER","November":"NOVEMBER","December":"DECEMBER"

[MeasureDay]
Measure=Time
Format=%A
Substitute="Monday":"MONDAY","Tuesday":"TUESDAY","Wednesday":"WEDNESDAY","Thursday":"THURSDAY","Friday":"FRIDAY","Saturday":"SATURDAY","Sunday":"SUNDAY"

-------------------------------------METERS--------------------------------------------

[MeterTime]
MeasureName=MeasureTime
IfAboveAction=MeterTime2
IfAboveValue=3:00 PM
Meter=STRING
X=0
Y=13
FontColor=255, 255, 255, 200
FontSize=78
FontFace=rockwell
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1

[MeterTime2]
MeasureName=MeasureTime
Meter=STRING
X=0
Y=13
FontColor=255, 0, 255, 200
FontSize=78
FontFace=rockwell
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1

[MeterDate]
MeasureName=MeasureDate
Meter=STRING
X=5
Y=100
FontColor=255, 255, 255, 200
FontSize=56
FontFace=rockwell
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1

[MeterMonth]
MeasureName=MeasureMonth
Meter=STRING
X=100
Y=104
FontColor=255, 255, 255, 200
FontSize=32
FontFace=rockwell
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1

[MeterDay]
MeasureName=MeasureDay
Meter=STRING
X=103
Y=147
FontColor=255, 255, 255, 200
FontSize=20
FontFace=rockwell
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Clock colour change ever so often...

Post by smurfier »

The ifaboveaction parts can only be used in a measure, not a meter. For example:

Code: Select all

[Variables]
Color=255,255,255,255

[msTime]
Measure=Time
Format=%#I
IfAboveValue=14
IfAboveAction=!RainmeterSetVariable Color 255,0,0,255
IfBelowValue=15
IfBelowAction=!RainmeterSetVariable Color 255,255,255,255
This would change the color to red if it's 3pm or later, and change it back to black if it's earlier than 3pm.
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 . . .
DumbDude1994
Posts: 43
Joined: November 12th, 2009, 2:04 am

Re: Clock colour change ever so often...

Post by DumbDude1994 »

That code wouldn't work with the skin that theory wanted to use (10-Foot HUD).
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Clock colour change ever so often...

Post by smurfier »

It's an example of how to do things correctly. In order to apply it to any specific skin, you would need to specify a color variable and then name it in every meter that you wish the color to change in. You can have a maximum of three colors in the change per measure being as there is IfAbove, IfBelow, and IfEqual.
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 . . .
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Clock colour change ever so often...

Post by JpsCrazy »

If you're creative with Calcs and Conditions, I'm pretty sure you can get any number of colors, but the more you have the more complicated it'd be.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Clock colour change ever so often...

Post by smurfier »

Like I said...per measure. You can have a second measure with another set of three actions.

There is however another not so nice method. Three, or four, Measures that added up equal one color code.

Code: Select all

[msTime]
Measure=Time
Format=%#I

[msTime2]
Measure=Time
Format=%#H:%M

[msColor1]
Measure=Calc
Formula=(msTime > 15) || (msTime = 15) ? 255 : 255

[msColor2]
Measure=Calc
Formula=(msTime > 15) || (msTime = 15) ? 0 : 255

[msColor3]
Measure=Calc
Formula=(msTime > 15) || (msTime = 15) ? 0 : 255

[mtString]
Meter=String
MeasureName=msTime2
FontColor=[Color1],[Color2],[Color3],255
DynamicVariables=1
In this example, if the time is 3pm or later, the text is red, else it is black.
Note: You can have a maximum of nine nested conditional statements thus limiting this method to 9 colors.
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 . . .
Skiant
Posts: 2
Joined: May 29th, 2010, 10:44 pm

Re: Clock colour change ever so often...

Post by Skiant »

Hey guys,

First post in here. I was looking some way to get colors on a temperature display using Speedfan plugin, and I arrived on this very interesting topic.

I tried to use the ifAbove / ifBelow to put temperatures in red if they go over a specific value, but it doesn't seem to work. I'm sure I've messed up something really stupid, but I can't point what, so if any of you see what's wrong, feel free to correct.

The measure :

Code: Select all

[MeasureSpeedTemp1]
Measure=Plugin
Plugin=Plugins\SpeedFanPlugin.dll
SpeedFanType=TEMPERATURE
SpeedFanNumber=1
ifAboveValue=50
ifAboveAction=!RainmeterSetVariable Temp1Color 255,0,0,200
ifBelowValue=49
IfBelowAction=!RainmeterSetVariable Temp1Color 255,255,255,130
And the display :

Code: Select all

[MeterText_CORE1]
Meter=STRING
X=95
Y=130
MeasureName=MeasureSpeedTemp1
Text="%1 °C"
FontColor=#Temp1Color#
FontSize=#FontHeight#
StringAlign=Right
NumofDecimals=0
FontFace=#FontName#
AntiAlias=1
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Clock colour change ever so often...

Post by smurfier »

Try this:

Code: Select all

[MeasureSpeedTemp1]
Measure=Plugin
Plugin=Plugins\SpeedFanPlugin.dll
SpeedFanType=TEMPERATURE
SpeedFanNumber=1

[MeasureColor]
Measure=Calc
Formula=MeasureSpeedTemp1>=50 ? 1 : -1
ifAboveValue=0
ifAboveAction=!RainmeterSetVariable Temp1Color 255,0,0,200
ifBelowValue=0
IfBelowAction=!RainmeterSetVariable Temp1Color 255,255,255,130

[MeterText_CORE1]
Meter=STRING
X=95
Y=130
MeasureName=MeasureSpeedTemp1
Text="%1 °C"
FontColor=#Temp1Color#
FontSize=#FontHeight#
StringAlign=Right
NumofDecimals=0
FontFace=#FontName#
AntiAlias=1
DynamicVariables=1
Using the second measure allows for the greater than or equal to functionality. Also, whenever you set a variable with the !RainmeterSetVariable bang, you need to set DynamicVariables=1 everywhere that variable is used.
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 . . .
Skiant
Posts: 2
Joined: May 29th, 2010, 10:44 pm

Re: Clock colour change ever so often...

Post by Skiant »

Works like a charm. Thanks a lot !