Skip to content

Instantly share code, notes, and snippets.

@dlinsin
Created May 12, 2012 14:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlinsin/2666823 to your computer and use it in GitHub Desktop.
Save dlinsin/2666823 to your computer and use it in GitHub Desktop.
Alfred Apple Script Extension to create iCal Reminder
-- extended from http://www.dirtdon.com/?p=1261
on alfred_script(q)
tell application "iCal"
activate
set theDueDate to (current date) + 1 * days
set time of theDueDate to 0
set hours of theDueDate to 8
set newtodo to (make new todo at end of todos in calendar "Private" with properties {summary:q, due date:theDueDate})
tell calendar "Private"
tell newtodo
make new sound alarm at end with properties {trigger date:theDueDate}
end tell
end tell
end tell
tell application "System Events"
set isRunning to (count of (every process whose bundle identifier is "com.Growl.GrowlHelperApp")) > 0
end tell
if isRunning then
tell application id "com.Growl.GrowlHelperApp"
set the allNotificationsList to ¬
{"New Reminders Task"}
set the enabledNotificationsList to ¬
{"New Reminders Task"}
register as application ¬
"New Reminders Task" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "iCal"
notify with name ¬
"New Reminders Task" title ¬
"New Task Created" description ¬
"Task: " & q ¬
application name "New Reminders Task"
end tell
end if
end alfred_script
@rpontremoli
Copy link

Just what I needed. Thanks!!

@dlinsin
Copy link
Author

dlinsin commented Jun 27, 2012

This is the more sophisticated implementation: https://github.com/dlinsin/alfred-reminders

@wamatt
Copy link

wamatt commented Aug 17, 2012

Superb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment