Archive for March, 2010
Various photos, March 2010
Here’s a batch of photo collections I have recently uploaded to Flickr:
Using AppleScript to prevent burnt dinners
Problem: After the initial “put pan on stove, turn heat on”, the next procedural step in dinner preparation typically tends to be “wait 3-4 minutes”, at which point I wander over to the computer, with the intention of reading just one or two short entries from my RSS feed reader, and end up waking up from my internet browsing 15 minutes later to the smell of burning food on the stove.
So I found the post “Create a simple timer using LaunchBar and AppleScript” by Justin Blanton. However, that approach uses both AppleScript and LaunchBar. I don’t have LaunchBar (or QuickSilver, or QSB) installed, and installing it just for this trivial task seemed overkill. I reasoned that a solution could equally well be built on top of Growl + AppleScript, without the need for LaunchBar.
So here’s my AppleScript+Growl solution. It’s a bit rough around the edges, assumes you already have Growl installed, does no error checking, etc.. Use at your own peril.
set message to ""
tell application "Finder"
display dialog "Enter the delay in minutes:"
default answer "" buttons {"OK"} default button 1
set howlong to text returned of the result
set duration to howlong * 60
display dialog "Enter the message:" default answer ""
buttons {"OK"} default button 1
set message to text returned of the result
end tell
tell application "GrowlHelperApp"
set the allNotificationsList to {"Delay Notification"}
set the enabledNotificationsList to
{"Delay Notification"}
register as application "DelayNotify" all notifications
allNotificationsList default notifications
enabledNotificationsList icon of application "iCal"
delay duration
notify with name "Delay Notification" title
"Notification" description message application name
"DelayNotify" with sticky
end tell
Using the “Save As… Application” option you can build an Application which sits on your desktop. Double-click this for each timer you want to set. Less elegant than just typing the command into LaunchBar, for sure, but equally functional, at least for my purposes.
Mt Hood
Just to share a view of Mt Hood:




