Created
December 14, 2009 22:18
-
-
Save tommorris/256491 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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