| EverythingDigital | RSS Feed | Flickr Photos | What Is Podcasting? |


« March 10, 2005 | Main | March 12, 2005 »

March 11, 2005

The PSP Countdown's Source

I am making the source of my PSP Launch Countdown App available to all, with the hope that others will expand on the idea and make their own AppleScript countdowns. It's fairly easy to change the code, simply by adjusting the psplaunchdate variable to the desired countdown's end. There are a couple references to the PSP that pop up in the dialog boxes, but those can easily be changed to meet the specifications for a different countdown. Read on to see the source, or download the original ApleScript script file below.

Download The Script File (.scpt)



Here is the AppleScript code used to compile the application. Have fun, and see what other countdowns you can come up with. Be sure to post them here in the comments when you finish them.

repeat
set todaydate to current date
set todayday to day of todaydate
set todaytime to time of todaydate

set psplaunchdate to date "Thursday, March 24, 2005 12:00:00 AM"
set psplaunchday to day of psplaunchdate
set psplaunchtime to time of psplaunchdate

set daysleft to psplaunchday - todayday
set timeleft to 86400 - todaytime

set totaltimeleft to timeleft + {86400 * daysleft}
set unroundedminutesleft to totaltimeleft / 60
set totalminutesleft to {round unroundedminutesleft}
set unroundedhoursleft to totalminutesleft / 60
set totalhoursleft to {round unroundedhoursleft}
set unroundeddaysleft to totalhoursleft / 24
set totaldaysleft to {round unroundeddaysleft}


if totaltimeleft is less than or equal to 0 then
display dialog "The PSP is here!"
exit repeat

else
display dialog "There are...

" & totaldaysleft & " days,

" & totalhoursleft & " hours,

" & totalminutesleft & " minutes, or

" & totaltimeleft & " seconds left until the PSP's launch.

This dialog will auto-refresh every 10 seconds, or you can manually refresh it by clicking OK." giving up after 10

end if
end repeat

Posted by Alan Joyce at 08:18 PM | Comments (3) | TrackBack

PSP Countdown App Update

I've made a few updates to the PSP Launch Countdown Application I hacked together earlier. It now auto-refreshes every 10 seconds. It is still available at the same download link

Posted by Alan Joyce at 06:05 PM | Comments (1) | TrackBack