🕷 zenspider.com

by ryan davis

Looking for the Ruby Quickref?

Triage Applescript for OmniFocus

Published 2013-07-30 @ 12:00

Tagged productivity, omnifocus, applescript, osx

I have a bunch of omnifocus tasks that tell me to go review my projects’ issue trackers. Each one has a note with a url in it that is hyperlinked. Unfortunately, omnifocus doesn’t let you cmd-click the url to open in the background. It’s incredibly aggravating that you have to flip back and forth between safari and omnifocus over and over. It is even worse when you do it across spaces (I always have omnifocus fullscreened).

I wrote this applescript (blech) because I couldn’t take it anymore and omnigroup has ignored my bug report for 2+ years now. All it does is go through each task in the current window and open a new Safari tab for each note that starts with “http”.

I hope it helps bring sanity to someone else.

tell application "Safari"
	tell application "OmniFocus"
		set urls to note of value of leaves of content of window 1
	end tell
	make new document
	repeat with aUrl in urls
		if aUrl starts with "http" then
			make new tab at end of window 1 with properties {URL:aUrl}
		end if
	end repeat
	delete tab 1 of window 1
end tell

I have this in the script menu titled “Triage”. Enjoy