I have no idea if this has been done before.
It also MIGHT slow rainmeter down as I believe the counter constantly runs. (I'm not sure though, as I don't notice any lag whatsoever.)
Feel free to use my code, but if you do I ask that you show me your creations! (And credit ) As I would love to see animated things such as this in the future of rainmeter.
Code: Select all
[Rainmeter]
Update=10
;Animation design and compilation by DeimosPhoenix
;Rainmeter counter idea thanks to smurfier on the forums
;Example clock from g3xter
[Variables]
MaxNumber=150
HEIGHT=100
THICK=10
speed=10
;MaxNumber dictates how far the bars extend, where 150 fits the example clock
;HEIGHT changes the display vertically, where 100 fits the example clock
; NOTE: Height looks good between aprox 50 and 250
;
;THICK is the thickness of the lines
;Higher Speed is faster movement
DOWORK=1
HIDDER=0
;Use hidden=#HIDDER# for stuff in the display
Font=imagine font
White=255,255,255,180
Black=0,0,0,255
;=========================================
;===========THE DISPLAY CODE==============
[cCounter]
Measure=Calc
Formula= (#DOWORK# ? (cCounter+(cCounter<#MaxNumber#)*#speed#) : (cCounter-(cCounter>0)*#speed#))
IfEqualValue=0
IfEqualAction=!SetVariable HIDDER (#HIDDER#=0)
DynamicVariables=4
;If true, increment the counter until it reaches the max number.
;If false, decrement the counter until it reaches zero.
;Speed multiplies the one, to count faster.
[Nothing]
Measure=Calc
Formula=1
[Angle]
Measure=Calc
Formula=3*PI/2
;This is the circle on the left that spins. (Just for show, no real use.)
[Circle]
Meter=ROUNDLINE
MeasureName=Nothing
X=0
Y=0
W=100
H=100
LineLength=40
LineStart=10
StartAngle=[cCounter]
RotationAngle=[Angle]
AntiAlias=1
LineColor=173,173,173
Solid=1
DynamicVariables=3
LeftMousedownAction=!Execute [!SetVariable DOWORK (#DOWORK#=0)][!SetVariable HIDDER (1)]
[DEC]
Measure=Calc
Formula = (#maxnumber# - cCounter)
[BARtop]
Meter=BAR
MeasureName=Nothing
X=100
Y=0
W=[DEC]
H=#THICK#
AntiAlias=1
BarColor=173,173,173
Solid=1
BarOrientation=HORIZONTAL
DynamicVariables=1
LeftMousedownAction=!Execute [!SetVariable DOWORK (#DOWORK#=0)][!SetVariable HIDDER (1)]
[HEIGHT_MT]
measure=Calc
Formula=(#HEIGHT# - #THICK#)
[BARbottom]
Meter=BAR
MeasureName=Nothing
X=100
Y=[HEIGHT_MT]
W=[DEC]
H=#THICK#
AntiAlias=1
BarColor=173,173,173
Solid=1
BarOrientation=HORIZONTAL
DynamicVariables=1
LeftMousedownAction=!Execute [!SetVariable DOWORK (#DOWORK#=0)][!SetVariable HIDDER (1)]
[POSI]
Measure=Calc
Formula = (#maxnumber# - (95*(#HEIGHT# - 50))/50 + 10 - cCounter)
;That silly thing is trying to predict where the semicircle line on the right
should go.
[DUBHEIGHT]
Measure=Calc
Formula = (#HEIGHT#)*2
[RIGHT_SEMI_CIRCLE]
Meter=ROUNDLINE
MeasureName=Nothing
X=[POSI]
Y=0
W=[DUBHEIGHT]
H=#HEIGHT#
LineLength=#HEIGHT#
LineStart=[HEIGHT_MT]
StartAngle=5.75
RotationAngle=1.07
AntiAlias=1
LineColor=173,173,173
Solid=1
DynamicVariables=1
LeftMousedownAction=!Execute [!SetVariable DOWORK (#DOWORK#=0)][!SetVariable HIDDER (1)]
;============END CODE=====================
;=========================================
;###############################################################################
######
;###############################################################################
######
;###############################################################################
######
;////////////////////////////////////////
; BACKGROUND
;////////////////////////////////////////
;////////////////////////////////////////
; Measure Time
;////////////////////////////////////////
[MeasureAMPM]
Measure=Time
Format=%p
[MeasureTime]
Measure=Time
[MeasureTimeH]
Measure=Time
Format="%I"
[MeasureTimeM]
Measure=Time
Format="%M"
[MeasureDate]
Measure=Time
Format="%a, %b %#d %Y"
[MeasureTimeS]
Measure=Time
Format="%S"
[MeasureASec]
Measure=Calc
Formula=MeasureTime % 2
MaxValue=1
MinValue=0
Substitute="0":"","1":":"
[TimeZone]
Measure=Time
Format="%Z"
Substitute="Mitteleuropäische Zeit":"Central European Time"
;////////////////////////////////////////
; Meter Time
;////////////////////////////////////////
[MeterTimeH2]
Meter=STRING
Prefix="88:"
X=100
Y=20
FontColor=255,255,255,40
StringStyle=NORMAL
FontSize=30
StringAlign=LEFT
FontFace=Digital
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterTimeH]
Meter=STRING
MeasureName=MeasureTimeH
X=0r
Y=0r
FontColor=255,255,255,255
StringStyle=NORMAL
FontSize=30
StringAlign=LEFT
FontFace=Digital
StringEffect=Border
FontEffectColor=0, 148, 255, 128
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterColonBlink1]
Meter=String
MeasureName=MeasureASec
X=42r
Y=0r
FontColor=255,255,255,255
FontSize=30
StringAlign=Left
FontFace=Digital
StringEffect=Border
FontEffectColor=0, 148, 255, 128
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterTimeM2]
Meter=STRING
Prefix="88:"
X=10r
Y=0r
FontColor=255,255,255,40
StringStyle=NORMAL
FontSize=30
StringAlign=LEFT
FontFace=Digital
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterTimeM]
Meter=STRING
MeasureName=MeasureTimeM
X=0r
Y=0r
FontColor=255,255,255,255
StringStyle=NORMAL
FontSize=30
StringAlign=LEFT
FontFace=Digital
StringEffect=Border
FontEffectColor=0, 148, 255, 128
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterColonBlink2]
Meter=String
MeasureName=MeasureASec
X=42r
Y=0r
FontColor=255,255,255,255
FontSize=30
StringAlign=Left
FontFace=Digital
StringEffect=Border
FontEffectColor=0, 148, 255, 128
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterTimeS]
Meter=STRING
MeasureName=MeasureTimeS
x=14r
y=1r
FontColor=255,255,255,255
FontSize=18
StringAlign=Left
FontFace=Digital
StringEffect=Border
FontEffectColor=0, 148, 255, 128
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterTimeS2]
Meter=STRING
Prefix="88"
x=0r
y=0r
FontColor=255,255,255,40
FontSize=18
StringAlign=Left
FontFace=Digital
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterAMPM]
Meter=STRING
MeasureName=MeasureAMPM
X=5r
Y=20r
FontColor=255,255,255,255
FontSize=9
StringAlign=Left
FontFace=hooge 05_53
StringEffect=Border
FontEffectColor=0, 148, 255, 128
AntiAlias=1
hidden=#HIDDER#
DynamicVariables=1
[MeterTimeZone]
Meter=String
MeasureName=TimeZone
x=-100r
y=20r
FontColor=255, 255, 255
FontSize=6
StringAlign=Left
FontFace=hooge 05_53
StringEffect=Border
FontEffectColor=0, 148, 255, 128
AntiAlias=1
Text="%1"
hidden=#HIDDER#
DynamicVariables=1
;###############################################################################
######
;###############################################################################
######
;###############################################################################
######