Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created December 14, 2009 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommorris/256491 to your computer and use it in GitHub Desktop.
Save tommorris/256491 to your computer and use it in GitHub Desktop.
-- Checks to see if GrowlHelperApp is running, then registers this script with Growl
tell application "System Events"
if application process "GrowlHelperApp" exists then
tell application "GrowlHelperApp" to register as application "Things" all notifications {"Reminder"} default notifications {"Reminder"} icon of application "Things"
end if
end tell
-- Checks to see if Things is running and determines how many to dos are in Today
tell application "System Events"
if application process "Things" exists then
tell application "Things" to set todayTasks to (count to do of list "Today")
if todayTasks is greater than 0 then
if todayTasks is 1 then
set growlTitle to "There is " & todayTasks & " task left to do today"
else
set growlTitle to "There are " & todayTasks & " tasks left to do today"
end if
--Notifies if there are to dos in Today
tell application "GrowlHelperApp" to notify with name "Reminder" title "Reminder" description growlTitle application name "Things" icon of application "Things"
end if
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment