Marcelo Toledo

startups, empreendedorismo e tecnologia

Things notify with Growl

Recently I started using Things as my Task manager, I’ve tested many others including the OmniFocus. In the beginning you might think that OmniFocus is more complete, but in the end you’ll see that they do the same job, with the difference that Things is much better designed.

I was missing some tasks because I am very used to look at my iCal all the time, but not to Things. So I’ve turned on iCal sync and created my first two applescripts, one that will display using growl all your tasks in your Today box, and the other was made for privacy, it will only show the number of tasks pending for today. I suggest you to use Lingon to schedule it.

Growl notify by name

thingsnotifybyname

And here is the code:

code:

-- 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
 
tell application "System Events"
	if application process "Things" exists then
		tell application "Things"
			set todayTasksCount to (count to do of list "Today")
			set todayTasks to to dos of list "Today"
		end tell
 
		if todayTasksCount is greater than 0 then
			set fullTaskName to ""
			repeat with taskItem in todayTasks
				set taskName to name of taskItem
				set fullTaskName to fullTaskName & "; " & taskName
				tell application "GrowlHelperApp" to notify with name "Reminder" title "Reminder" description taskName application name "Things" icon of application "Things"
			end repeat
		end if
	end if
end tell

Growl notify by count

thingsnotifybycount

And here is the code:

code:

-- 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
 
tell application "System Events"
	if application process "Things" exists then
		tell application "Things" to set todayTasksCount to (count to do of list "Today")
 
		if todayTasksCount is greater than 0 then
			set growlTitle to "You still have " & todayTasksCount & " task(s) for 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

  • Tim

    Hello,

    Your script is fantastic. I am having trouble setting it up in Lingon. Could you post how you have it set up through Lingon? Thanks

    • http://profiles.google.com/sanderbongaards Sander Bongaards

      The same problem here. Could you post how you have it set up through Lingon?