View Single Post
I know that OF has a clipping service that does a really nice job using the OS X summarize function to put a summary of the selected text in the title of the task, which is a reasonable approach. So why this script?

There are times when I prefer the title of the window to be the title of the task. With the use of Fast Scripts from Red Sweater Software, I have my choice between the OF clipping key combo and the key combo for this script to create a task from a Safari page. The best of both worlds!

So here is the very brief script that creates a task where:
Task Title = Window Title
Task Note = URL and Selected Text

Code:
tell application "Safari"
	set u to URL of front document
	set n to name of front window
	set t to (do JavaScript "(getSelection())" in document 1)
	set theNote to u & return & return & t
end tell

tell application "OmniFocus"
	tell default document
		make new inbox task with properties {name:n, note:theNote}
	end tell
end tell

Last edited by jgrafix; 2010-07-25 at 02:50 PM..