Growl Notifications for iCal (Tiger only)
by Thomas Aylott Fri, 21 Jul 2006 17:10:00 GMT
This only works in Mac OS X Tiger 10.4
I’m still working on an updated version for Leopard.

I love iCal, but I really hate the giant reminder panel stealing focus and getting in the way. Ewww.
I love Growl. There was an obvious need for a way to do iCal Growl notifications.
iCal has a nice feature where you can run an applescript using the Open File… feature in the alarm thing. The problem with this is that it doesn’t send any applescript variables to the script. So you would have to either do a generic alert for every reminder or have a separate script for each reminder. This is not hip, nor DRY.
I went searching for a solution to this and came across the article iCal and Growl @ Origa.me.uk where he shows you how to hack the internal applescript file that handles sending an Email on an alarm. This is totally awesome! You get access to all of the variables and can do the Growl. The only problem with his method is that it removes your ability to ever send another Email Alarm again.
I took his idea and added a simple if filter to the applescript. It works by checking for the email address “Growl”. If it sees that address then it does a Growl thinggy, otherwise it does the email like normal.
Download the Scripts
iCal Mail Script (with Growl Support)
How to Install & Use
- Add the email address ”Growl”
to your personal Address Book entry.- (Mark it as secret if you have that feature enabled.)
- Copy
Mail.scptinto the iCal resources./Applications/iCal.app/Contents/Resources/
- Copy
Mail.scptinto the iCalHelper resources./Applications/iCal.app/Contents/Resources/iCal Helper.app/Contents/Resources/
- Quit iCal
- You should Quit iCalAlarmScheduler too,
- or you can log out and back in.
- Make a new iCal Event
- Make a new Email Alarm on that event
- Set the email address to “Growl”
- Bask in the awesome iCal Growl Alarm goodness!
Here is the actual code:
on send_mail_sbr(subjectLine, messageText, myrecipient)
if myrecipient = "Growl" then
send_mail_sbr_GROWL(subjectLine, messageText, myrecipient)
else
send_mail_sbr_EMAIL(subjectLine, messageText, myrecipient)
end if
end send_mail_sbr
on send_mail_sbr_EMAIL(subjectLine, messageText, myrecipient)
tell application "Mail"
set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:subjectLine, content:messageText})
tell mymail to make new to recipient at beginning of to recipients with properties {address:myrecipient}
send mymail
end tell
end send_mail_sbr_EMAIL
on send_mail_sbr_GROWL(subjectLine, messageText, myrecipient)
tell application "GrowlHelperApp"
set theName to "New Event"
set theAppName to "Custom iCal Notifications"
set the allNotificationsList to {theName}
set the enabledNotificationsList to {theName}
register as application theAppName ¬
all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "iCal"
notify with name theName ¬
title subjectLine ¬
description messageText ¬
application name theAppName ¬
with sticky
end tell
end send_mail_sbr_GROWL

Awesome script. It even sets the Growl notification to sticky – perfect! :)
One question: “Add the email address ”Growl” to your personal Address Book entry. (Mark it as secret if you have that feature enabled.)”
How can I mark an eMail address as secret? Is this feature only available when syncing to .Mac?
The setting is in the Address Book. The vCard pane. Check ’Enable private “Me” card’.
Then you’ll get a checkbox next to each entry in your Me card.
Thanks, I never found that setting. There’s always something new to learn on the Mac ;)
This is an awesome script. Much thanks for your work on it.
I’ve done something wrong, what is the name of the compiled applescript supposed to be? “Mail.scpt” or “Mail.applescript”?
Mail.scpt is the compiled version.
I’m not sure why, but the original article told me to compile it as run only. I’m sure he had a good reason.
I put the other one in there so you’d have the source.
Thanks a lot! Works great!
Thank you very much. I like it.
Sorry for the trouble. After reading both tutorials, I’m confused how you can still send emails and growl notifications. In my drop down list, I only have my email address. It looks like your script will send a growl notification if I select Growl from the drop down. Is there a way to add Growl to the drop down list or am I missing something. Thanks for the script, I’m sure it’ll work great once I figure it out.
You have to add “Growl” as an email on your ME card in the address book.
It’s a hack, but it’s the only way i know of adding anything to that list.
Thanks a lot, this little hack is great! I have one question though: The notifications I get are not sticky. How could I get that? Best regards.
You can modify that in the Growl Pref Pane. And just make every single notification from the script sticky.