CopyPastehas never been so tasty!

Countdown rainmeter code

by reitermaniac

  • 0
  • 0
  • 1
971 views

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;Countdown to Dizzknee
;
;author: Gregg Doherty
;
; Used Calendar for HUD.Vision by Jiri Mahel http://mepu.deviantart.com/ for LeapYear Calculation
; Font Waltograph from http://mickeyavenue.com/fonts/waltograph/
; Image: Photohopped version of http://www.howtodrawguide.com/how-to-draw-cartoons/draw-mickey-mouse-32/

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Rainmeter]
Author=Gregg Doherty
AppVersion=0.1
Update=1000
;===========================================

[Variables]
Color=255, 255, 255, 240
FontName=Corbel
FontHeight=10
AntiAlias=1

;Target Date and Time:
;-------------------------------
[MeasureTYear]
Measure=Calc
Formula= 11

[MeasureTMonth]
Measure=Calc
Formula= 05

[MeasureTDay]
Measure=Calc
Formula= 31

[MeasureTHour]
Measure=Calc
Formula= 0

[MeasureTMinute]
Measure=Calc
Formula= 01

;-------------------------
; Current Measures
; =============

[MeasureYear]
Measure=Time
Format="%y"

[MeasureMonth]
Measure=Time
Format="%#m"

[MeasureDay]
Measure=Time
Format="%d"

[MeasureHour]
Measure=Time
Format="%H"

[MeasureMinute]
Measure=Time
Format="%M"

[MeasureSecond]
Measure=Time
Format="%S"

[MeasureDaysLeft]
Measure=Calc
Formula=(MeasureMonth = 1 ? 334 : (MeasureMonth = 2 ? 306 : (MeasureMonth = 3 ? 275 : (MeasureMonth = 4 ? 245 : (MeasureMonth = 5 ? 214 : (MeasureMonth = 6 ? 184 : (MeasureMonth = 7 ? 153 : (MeasureMonth = 8 ? 122 : 99 ))))))))

[MeasureDaysXTEST]
Measure=Calc
Formula= MeasureMonth > 6 ? MeasureDays10TEST + MeasureDaysLeftInMonth  : MeasureDaysTEST + MeasureDaysLeftInMonth

[MeasureDays10TEST]
Measure=Calc
Formula=(MeasureMonth = 7 ? 153 : (MeasureMonth = 8 ? 122 : ( MeasureMonth = 9 ? 92 : ( MeasureMonth = 10 ? 61 : ( MeasureMonth = 11 ? 31 : 0 )))))

[MeasureDaysTEST]
Measure=Calc
Formula=(MeasureMonth = 1 ? 334 : (MeasureMonth = 2 ? 306 : ( MeasureMonth = 3 ? 275 : (MeasureMonth = 4 ? 245 : (MeasureMonth = 5 ? 214 : 184 )))))

[mDenVMesici]
Measure=Calc
Formula=((MeasureMonth = 4) || (MeasureMonth = 6) || (MeasureMonth = 9) || (MeasureMonth = 11)) ? 30 : ((MeasureMonth = 2) ? ((((MeasureYear % 4) = 0) && ((MeasureYear % 100) > 0)) ? 29 : (((MeasureYear % 400) = 0) ? 29 : 28)) : 31)

[MeasureDaysLeftInMonth]
Measure=Calc
Formula= mDenVMesici - MeasureDay

; Target Measures
; ============

[MeasureTDaysXTEST]
Measure=Calc
Formula= MeasureTMonth > 6 ? MeasureTDays10TEST + MeasureTDay  : MeasureTDaysTEST + MeasureTDay

[MeasureTDays10TEST]
Measure=Calc
Formula=(MeasureTMonth = 7 ? 181 : (MeasureTMonth = 8 ? 212 : (MeasureTMonth = 9 ? 243 : (MeasureTMonth = 10 ? 273 : (MeasureTMonth = 11 ? 304 : 334 )))))

[MeasureTLeapYear]
Measure=Calc
Formula= ((((MeasureTYear % 4) = 0) && ((MeasureTYear % 100) > 0)) ? 1 : (((MeasureTYear % 400) = 0) ? 1 : 0 ))

[MeasureTLeapYear]
Measure=Calc
Formula= ((((MeasureTYear % 4) = 0) && ((MeasureTYear % 100) > 0)) ? 1 : (((MeasureTYear % 400) = 0) ? 1 : 0 ))

[MeasureTDaysTEST]
Measure=Calc
;Formula=(MeasureTMonth = 1 ? 0 : (MeasureTMonth = 2 ? 31 : (MeasureTMonth = 3 ? (59 + MeasureTLeapYear) : (MeasureTMonth = 4 ? 90 : (MeasureTMonth = 5 ? 120 : (MeasureTMonth = 6 ? 151 )))))
Formula= MeasureTMonth = 1 ? 0 :   (MeasureTMonth = 2 ? 31 : (MeasureTMonth = 3 ? (59 + MeasureTLeapYear) : (MeasureTMonth = 4 ? 90 : (MeasureTMonth = 5 ? 120 : 151 ))))


; Calculate
; ========

[MeasureSameYear]
Measure=Calc
Formula= MeasureTYear - MeasureYear = 0 ? 1 : 0

[MeasureTDaysDiffFromEOY]
Measure=Calc
Formula= MeasureSameYear = 1 ? MeasureTDaysXTEST - 365 : MeasureTDaysXTEST

[MeasureYearDiff]
Measure=Calc
Formula= ((MeasureTMonth > MeasureMonth) || (MeasureTMonth = MeasureMonth)) ? MeasureTYear - MeasureYear : MeasureTYear - MeasureYear - 1

[MeasureMonthDiff]
Measure=Calc
Formula= ((MeasureTMonth = MeasureMonth) || (MeasureTMonth > MeasureMonth)) ? ((MeasureTDay > MeasureDay) || (MeasureTDay = MeasureDay) ? MeasureTMonth - MeasureMonth  :   MeasureTMonth - MeasureMonth - 1 ) : 11 - MeasureMonth + MeasureTMonth

[MeasureDayDiff]
Measure=Calc
Formula= ((MeasureTDay = MeasureDay) || (MeasureTDay > MeasureDay)) ? MeasureTDay - MeasureDay : ( ( mDenVMesici  -  MeasureDay) + MeasureTDay)

[MeasureTotalDays]
Measure=Calc
Formula= MeasureYearDiff > 0 ? MeasureTDaysDiffFromEOY + MeasureDaysXTEST + ( ( MeasureYearDiff - 1 ) * 365 ) :  MeasureTDaysDiffFromEOY + MeasureDaysXTEST + ( MeasureYearDiff  * 365 )

[MeasureHoursLeftToday]
Measure=Calc
Formula=23 - MeasureHour + MeasureTHour

[MeasureDaysDisplay]
Measure=Calc
Formula=MeasureHoursLeftToday > 24 ? MeasureDayDiff + 1 : MeasureDayDiff

[MeasureMinutesLeftThisHour]
Measure=Calc
Formula=59 - MeasureMinute + MeasureTMinute

[MeasureHoursDisplay]
Measure=Calc
Formula=MeasureMinutesLeftThisHour > 60 ? MeasureHoursLeftToday + 1 : MeasureHoursLeftToday

[MeasureMinutesDisplay]
Measure=Calc
Formula=MeasureMinutesLeftThisHour % 60

[MeasureSecondsLeftThisMinute]
Measure=Calc
Formula=59 - MeasureSecond

; METERS
; ========

[MeterYearDiff]
Meter=STRING
MeasureName=MeasureYearDiff
X=50
Y=5
StringStyle=BOLD
StringAlign=LEFT
Postfix=" years"
FontColor=#Color#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1

[MeterMonthDiff]
Meter=STRING
MeasureName=MeasureMonthDiff
X=1R
Y=5
Postfix=" months"
StringStyle=BOLD
StringAlign=LEFT
FontColor=#Color#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1

[MeterDayDiff]
Meter=STRING
MeasureName=MeasureDaysDisplay
X=1R
Y=5
Postfix=" days"
StringStyle=BOLD
StringAlign=LEFT
FontColor=#Color#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1

[MeterHourDiff]
Meter=STRING
MeasureName=MeasureHoursDisplay
X=1R
Y=5
Postfix=" hours"
StringStyle=BOLD
StringAlign=LEFT
FontColor=#Color#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1

[MeterMinuteDiff]
Meter=STRING
MeasureName=MeasureMinutesDisplay
X=1R
Y=5
Postfix=" min"
StringStyle=BOLD
StringAlign=LEFT
FontColor=#Color#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1

[MeterSecondDiff]
Meter=STRING
MeasureName=MeasureSecondsLeftThisMinute
X=1R
Y=5
H=50
W=200
Postfix=" sec"
StringStyle=BOLD
StringAlign=LEFT
FontColor=#Color#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Hidden=0

[MeterTotalDays]
Meter=STRING
X=225
Y=25
Prefix="TILL SUMMER 2011"
StringStyle=BOLD
StringAlign=LEFT
FontColor=#Color#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1



Comments

  • Angus
    Hey, 
    I tired your code, and it sorta works. I messed around with the font and sizes to make it mass-effect like, but when I type in a target date, it only countdowns to the next hour, and the day, month, year, and hour variables remain at a constant 0. Can you help me?

Add A Comment: