Skip to content

Countdown to Chrifsmas

December 23, 2007

This is what happens when you have a Sun Ray photo frame in your kitchen and a few minutes to spare:


27 lines of wish:

#!/usr/bin/wish  message .message -textvariable countdown -width 800 -font {-family times -size 24} pack .message set xmas [clock scan "25 dec 2007" ]  proc hours_mins_secs { total } { 	set secs [expr $total % 60 ] 	set mins [expr ($total/60) % 60 ] 	set hours [expr ($total/3600) ] 	return "$hours hours, $mins minutes, $secs seconds." }  proc doit {} { 	global xmas 	global countdown 	set t [expr $xmas – [clock seconds]] 	if { $t > 0 } { 		set countdown  "Time Until Chrifsmas:\n[hours_mins_secs $t]" 	} else { 		set countdown  [clock format [clock seconds]] 	} 	after 1000 doit }  doit tkwait  window .message

Lots of things could be better but it keeps the kids happy.

Advertisements

From → Solaris

3 Comments
  1. So I guess you could say that’s your Christmas wish?

  2. That is terrible! It made me laugh though.
    Thanks

  3. Merry Christmas to you,your friends and your family.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: