Created
December 10, 2010 17:37
-
-
Save gfontenot/736503 to your computer and use it in GitHub Desktop.
Display tasks in the "Today" list of Things via a sticky growl notification
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
on run | |
tell application "Things" | |
set todoTitles to {} | |
repeat with toDo in to dos of list "Today" | |
set end of todoTitles to the name of toDo | |
end repeat | |
end tell | |
set tid to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to " | |
" | |
set todoTitles to todoTitles as string | |
tell application "System Events" to set GrowlRun to (count of (every process whose name is "GrowlHelperApp")) > 0 | |
if GrowlRun then growlNotify(todoTitles) | |
end run | |
on growlNotify(theToDos) | |
tell application "GrowlHelperApp" | |
set the allNotificationsList to {"Display Tasks"} | |
set the enabledNotificationsList to {"Display Tasks"} | |
register as application "Things Display" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Things" | |
notify with name "Display Tasks" title "Today's Tasks" description theToDos application name "Things Display" sticky yes | |
end tell | |
end growlNotify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment