The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
Task with selected text from Safari Thread Tools Search this Thread Display Modes
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..
 
Thanks for posting this! I think you may have provided the solution to one of my wishes. I often wish that I had another bucky bit that I could hold down when using the clipping shortcut so I could control whether my clipping goes straight to the Inbox, or stops in the Quick Entry box. No matter which way I set the option, inevitably the next bunch of clippings turn out to be ones where the other choice would have been better! It looks like perhaps the solution for me would be to have the clipping service go to the Quick Entry box, and cobble up a similar script to yours that puts the clipping straight in, fired off from a suitable keyboard shortcut via Fast Scripts.

Another thread to be clipped to my "Useful Applescript posts from the Omni forums" project :)
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I highlight only selected text - not whole row? p1bolin OmniOutliner 3 for Mac 2 2012-06-17 03:13 PM
New Script - Selected Entourage EMail to Selected OF Task davidsomeone OmniFocus Extras 1 2009-03-06 12:22 PM
Send selected Finder document to OF inbox as task Marek Kowalczyk OmniFocus Extras 1 2008-02-25 11:54 AM
New row from selected text GwiDan OmniOutliner 3 for Mac 1 2007-08-07 10:00 AM
Request: typing when entire row selected should edit Task Name realtyler OmniPlan General 1 2006-10-19 03:35 PM


All times are GMT -8. The time now is 06:56 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.