Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Create Growl notifications from iCal events' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create Growl notifications from iCal events
Authored by: lalcan on Aug 09, '07 01:10:43PM
Since the first time i read it, i thought this solution was too complicated and involved tinkering with files a user shouldn't be editing... almost a year ago I wrote an script that can be executed from iCal, it has worked almost flawlessly and here it is... hope you like it...

Or, if you prefer, here's the code for it, just copy into a new script, save it and call it from iCal.

-- GrowlIt
-- Description:
-- An applescript that displays events and to-do's from iCal as Growl notifications.
-- Based on multiple other Applescripts found in multiple sites.
-- No warranty. Tested with iCal 2.0.5 and Growl 0.7.6 under Mac OS X Tiger 10.4.10
-- Written by Leonardo Alcantara
-- Last modified: 2007-08-08
set myAllNotesList to {"Events"}
set appName to "GrowlIt"
set now to current date
set startD to now - 2 * hours
set endD to now + 1 * days
tell application "GrowlHelperApp" to
register as application appName all notifications myAllNotesList default notifications myAllNotesList icon of application "iCal"

tell application "iCal"
repeat with thisCalendar in calendars
repeat with thisEvent in ((every event of thisCalendar) whose ((start date ≥ startD and start date ≤ endD) or (end date ≥ now and start date ≤ startD)))
set theEventSummary to ""
set theEventDescription to ""
if exists open file alarm of thisEvent then
set interValue to trigger interval of open file alarm of thisEvent
if (start date of thisEvent is greater than (now - (interValue * minutes) - (1 * minutes)) and start date of thisEvent is less than (now - (interValue * minutes) + (1 * minutes))) then
tell thisEvent
if exists summary of thisEvent then
set theEventSummary to (summary & " in " & (interValue * -1) & " minutes")
end if
set interValue to trigger interval of first open file alarm of thisEvent
if exists description of thisEvent then
set theEventDescription to description
end if
end tell
tell application "GrowlHelperApp" to
notify with name "Events" title theEventSummary description theEventDescription application name appName with sticky
end if
end if
end repeat
end repeat
end tell

[ Reply to This | # ]
Create Growl notifications from iCal events
Authored by: bogstep on Oct 03, '08 12:56:07PM

I've been using Growlit and it's great.

I noticed that iCal event alarms with growlit say "such and such event in 540 minutes" instead of showing it in hours and minutes. How would I change it to show Hours and Minutes instead of just total minutes?

[ Reply to This | # ]