I’ve been a bit busy lately (hopefully the start of a later, more interesting thread), so I haven’t been able to post, or even read, at all.
But enough of that - basically, I’m looking for a free, downloadable desktop countdown application. It has to be able to handle multiple countdowns (7 or so), but it doesn’t have to countdown hours, minutes, or seconds, only days. Does this sound like anything anyone has seen?
Paste the code below into a text file with an .hta extension.
Customize the objCounters entries on lines 17-23 with the names of the events and their due dates. You can add or remove as many entries as desired. They can be changed at any time by editing the file in Notepad.
Running the .hta file will display a page with the number of days left until each event occurs. It will update every hour. This interval can be adjusted by changing the number of milliseconds in the intRefresh variable on line 14.
<HTML>
<HEAD>
<TITLE>Counting The Days</TITLE>
<HTA:APPLICATION
ID="objCTD"
APPLICATIONNAME="CTD"
SCROLL="yes"
SINGLEINSTANCE="yes"
>
</HEAD>
<SCRIPT Language="VBScript">
intRefresh = 3600000
Set objCounters = CreateObject("Scripting.Dictionary")
objCounters.Add "Post Thread", #8/20/09#
objCounters.Add "Anniversary", #8/22/09#
objCounters.Add "Labor Day", #9/7/2009#
objCounters.Add "Work Deadline", #9/9/2009#
objCounters.Add "Christmas", #12/31/2009#
objCounters.Add "Groundhog Day", #2/2/2010#
objCounters.Add "The End Of The World As We Know It", #1/1/2012#
Sub Window_onLoad
Calculate()
idTimer = Window.SetInterval("Calculate()", intRefresh)
End Sub
Sub Calculate()
strHTML = "<table cellspacing=""30"">"
For Each strCounter in objCounters.Keys
intDiff = DateDiff("d", Now, objCounters.Item(strCounter))
If intDiff > 1 Then
strHTML = strHTML & "<tr><td>" & strCounter & _
":</td><td>" & intDiff & " days left</td></tr>"
ElseIf intDiff = 1 Then
strHTML = strHTML & "<tr><td>" & strCounter & _
":</td><td>" & intDiff & " day left</td></tr>"
Else
strHTML = strHTML & "<tr><td>" & strCounter & _
":</td><td><font color=red>Time's up!</font></td></tr>"
End If
Next
CounterArea.InnerHTML = strHTML & "</table>"
End Sub
</SCRIPT>
<BODY STYLE="font:10 pt arial black; color:white;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0, StartColorStr='#FFFFF', EndColorStr='#100000')">
<span id=CounterArea></span>
</BODY>
</HTML>