Skip to content

Instantly share code, notes, and snippets.

@brandonpittman
Last active December 17, 2015 09:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brandonpittman/5591714 to your computer and use it in GitHub Desktop.
Save brandonpittman/5591714 to your computer and use it in GitHub Desktop.
This is an AppleScript to check OmniFocus' Inbox and notifies you if the "taskCount" has been exceeded using Sticky Notifications.app.
(*
Please change your folder and project names to whatever you use in OmniFocus. I have the acceptable task count at 1 but change this to whatever you feel comfortable with.
Author: Brandon Pittman
URL: http://brandonpittman.net
*)
set taskCount to 1
tell application "OmniFocus"
tell the front document
set theCount to number of inbox tasks
if theCount ≥ taskCount then
tell application "System Events" to open location "sticky-notifications://note?title=OmniFocus&message=Clean%20out%20your%20inbox!"
end if
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment