It is currently May 18th, 2022, 3:16 am

Event Countdown for Rainmeter?

General topics related to Rainmeter.
Hollthulhu
Posts: 1
Joined: October 10th, 2010, 9:13 pm

Event Countdown for Rainmeter?

Post by Hollthulhu »

Can anyone recommend some good event countdown monitors out there that work with Rainmeter?

Or maybe some skin scripts I could use to learn how to make my own to match my layout and to have multiple countdowns up.

I tried searching around the forums and some other sites but a lot of posts I found were old and figured some people might know some new info on this!
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Event Countdown for Rainmeter?

Post by Chewtoy »

You can have this one if you want.

Code: Select all

[Rainmeter]
Author=Chewtoy
DynamicWindowSize=1
BackGroundMode=2
SolidColor=#DBG#
Update=1000

;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins

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

;End of added Metadata

[Variables]
FontColor=255, 255, 255, 150
FontFace=Tahoma
FontFace2=Webdings
FontSize=8
FontSize2=13
Effect=Border
EffectColor=0,0,0,100
DBG=0, 0, 0, 1
SX=15
Dist=5
Hide=1

Event=End of the world

SYear=2012
SMonth=12
SDate=21
SHour=12
SMinute=21


;-------------
;Styles
;-------------

[Display]
FontColor=#FontColor#
FontFace=#FontFace#
FontSize=#FontSize2#
StringEffect=#Effect#
EffectColor=#EffectColor#
AntiAlias=1
DynamicVariables=1


[Title]
FontColor=#FontColor#
FontFace=#FontFace#
FontSize=#FontSize#
StringEffect=#Effect#
EffectColor=#EffectColor#
AntiAlias=1

[Number]
FontColor=#FontColor#
FontFace=#FontFace2#
FontSize=#FontSize2#
StringEffect=#Effect#
EffectColor=#EffectColor#
AntiAlias=1
Group=Set
Hidden=#Hide#

;-------------
;Measures
;-------------

[MYear]
Measure=Time
Format=%Y

[MDayOfYear]
Measure=Time
Format=%j

[MMonth]
Measure=Time
Format=%m

[MDate]
Measure=Time
Format=%d

[MHour]
Measure=Time
Format=%H

[MMinute]
Measure=Time
Format=%M

[MSecond]
Measure=Time
Format=%S

;-------------
;Calculations
;-------------

[DaysOnYear]
Measure=Calc
Formula=([MYear] % 4) > 0 ? 365 : 366
DynamicVariables=1

[DaysOnSYear]
Measure=Calc
Formula=(#SYear# % 4) > 0 ? 365 : 366
DynamicVariables=1

[CHide]
Measure=Calc
Formula=((#Hide#+1) > 1) ? 0 : #Hide#+1
DynamicVariables=1

[SetY+]
Measure=Calc
Formula=((#SYear#+1) > 100000000) ? 1 : #SYear#+1
DynamicVariables=1

[SetY-]
Measure=Calc
Formula=((#SYear#-1) < 0) ? 2000 : #SYear#-1
DynamicVariables=1

[SetMo+]
Measure=Calc
Formula=((#SMonth#+1) > 12) ? 1 : #SMonth#+1
DynamicVariables=1

[SetMo-]
Measure=Calc
Formula=((#SMonth#-1) < 1) ? 12 : #SMonth#-1
DynamicVariables=1

[SExtraMo0]
Measure=Calc
Formula=#SMonth# > 9 ? 1 : 0
DynamicVariables=1
Substitute="1":""

[MonthRange]
Measure=Calc
Formula=((#SMonth# = 4) || (#SMonth# = 6) || (#SMonth# = 9) || (#SMonth# = 11)) ? 30 : ((#SMonth# = 2) ? ((((MYear % 4) = 0) && ((MYear % 100) > 0)) ? 29 : (((MYear % 400) = 0) ? 29 : 28)) : 31)
DynamicVariables=1

[SetD+]
Measure=Calc
Formula=((#SDate#+1) > [MonthRange]) ? 01 : #SDate#+1
DynamicVariables=1

[SetD-]
Measure=Calc
Formula=((#SDate#-1) < 01) ? [MonthRange] : #SDate#-1
DynamicVariables=1

[SExtraD0]
Measure=Calc
Formula=#SDate# > 9 ? 1 : 0
DynamicVariables=1
Substitute="1":""

[SetH+]
Measure=Calc
Formula=((#SHour#+1) > 23) ? 0 : #SHour#+1
DynamicVariables=1

[SetH-]
Measure=Calc
Formula=((#SHour#-1) < 0) ? 23 : #SHour#-1
DynamicVariables=1

[SExtraH0]
Measure=Calc
Formula=#SHour# > 9 ? 1 : 0
DynamicVariables=1
Substitute="1":""

[SetMi+]
Measure=Calc
Formula=((#SMinute#+1) > 59) ? 0 : #SMinute#+1
DynamicVariables=1

[SetMi-]
Measure=Calc
Formula=((#SMinute#-1) < 0) ? 59 : #SMinute#-1
DynamicVariables=1

[SExtraM0]
Measure=Calc
Formula=#SMinute# > 9 ? 1 : 0
DynamicVariables=1
Substitute="1":""

[CheckYear]
Measure=Calc
Formula=#SYear# - MYear

[YearDays]
Measure=Calc
Formula=[Checkyear] * 365.25
DynamicVariables=1

[CheckNow]
Measure=Calc
Formula=(MMonth * 60 * 60 * 24 * (DaysOnYear/12)) + (MDate * 60 * 60 * 24) + (MHour*60*60) + (MMinute*60) + MSecond
DynamicVariables=1

[CheckSet]
Measure=Calc
Formula=(YearDays * 60 * 60 * 24) + (#SMonth# * 60 * 60 * 24 * (DaysOnYear/12)) + (#SDate# * 60 * 60 * 24) + (#SHour# * 60 * 60) + (#SMinute# * 60)
DynamicVariables=1


[LeftRaw]
Measure=Calc
Formula=[CheckSet] - [CheckNow]
DynamicVariables=1

[LeftDays]
Measure=Calc
Formula=([LeftRaw] - ([LeftRaw] %(60*60*24))) / (60*60*24)
DynamicVariables=1

[LeftHours]
Measure=Calc
Formula=(([LeftRaw] - ([LeftRaw] %(60*60)))/(60*60)) - ([LeftDays]*24)
DynamicVariables=1

[LeftMinutes]
Measure=Calc
Formula=((([LeftRaw]-30)  %(60*60)) / 60)
DynamicVariables=1

[LeftSeconds]
Measure=Calc
Formula=[LeftRaw] %60
DynamicVariables=1

[Extra0]
Measure=Calc
Formula=[LeftSeconds] > 9 ? 1 : 0
DynamicVariables=1
Substitute="1":""



;-------------
;Graphics
;-------------

[Event]
Meter=String
MeterStyle=Display
Text="#Event#"
X=#SX#
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables Hide [CHide]][!RainmeterRefresh]

[Left]
Meter=String
MeasureName=LeftDays
MeasureName2=LeftHours
MeasureName3=LeftMinutes
MeasureName4=Extra0
MeasureName5=LeftSeconds
MeterStyle=Title
Text="Left: %1d %2h %3m %4%5s"
X=r
Y=R
LeftMouseUpAction=!Execute [!RainmeterRedraw]


;--

[Y+]
Meter=String
MeterStyle=Number
Text="5"
X=#SX#
Y=R
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SYear [SetY+]][!RainmeterRefresh]

[Mo+]
Meter=String
MeterStyle=Number
Text="5"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SMonth [SetMo+]][!RainmeterRefresh]

[D+]
Meter=String
MeterStyle=Number
Text="5"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SDate [SetD+]][!RainmeterRefresh]

[H+]
Meter=String
MeterStyle=Number
Text="5"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SHour [SetH+]][!RainmeterRefresh]

[Mi+]
Meter=String
MeterStyle=Number
Text="5"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SMinute [SetMi+]][!RainmeterRefresh]

;---

[To]
Meter=String
MeasureName=SExtraMo0
MeasureName2=SExtraD0
MeasureName3=SExtraH0
MeasureName4=SExtraM0
MeterStyle=Display
Text="#SYear#-%1#SMonth#-%2#SDate# %3#SHour#:%4#SMinute#"
Y=R
Group=Set
Hidden=#Hide#

;---

[Y-]
Meter=String
MeterStyle=Number
Text="6"
X=#SX#
Y=R
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SYear [SetY-]][!RainmeterRefresh]

[Mo-]
Meter=String
MeterStyle=Number
Text="6"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SMonth [SetMo-]][!RainmeterRefresh]

[D-]
Meter=String
MeterStyle=Number
Text="6"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SDate [SetD-]][!RainmeterRefresh]

[H-]
Meter=String
MeterStyle=Number
Text="6"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SHour [SetH-]][!RainmeterRefresh]

[Mi-]
Meter=String
MeterStyle=Number
Text="6"
X=#Dist#R
Y=r
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables SMinute [SetMi-]][!RainmeterRefresh]
Worked on in some time ago but I've lost interest.
Works to some degree. Can probably be inproved. But it does the countdown rather well, even tough it is a little of thanks to the fact that all months are not as long.
I don't think, therefore I'm not.