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 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Get selected tasks with script? Thread Tools Search this Thread Display Modes
I'm starting to poke around with the scripting interface. I've been unable to sling the code to access the selected tasks. I think this should work:
Code:
tell application "OmniFocus"
	tell document window of front document
		tell content
			return selected trees
		end tell
	end tell
end tell
But I get "OmniFocus got an error: NSInternalScriptError".

Anyone have this sorted out yet?

(Also sent via Send Feedback)
 
OK, I figured out how to access the selected items:
Code:
tell application "OmniFocus"
	tell front document
		tell document window 1
			set theSelectedItems to selected trees of content
			set theNote to note of value of item 1 of theSelectedItems
		end tell
	end tell
end tell
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to re-order selected items by start date barrettj OmniFocus Extras 2 2013-04-11 06:34 AM
Script: Schedule selected items for this weekend dbyler OmniFocus Extras 1 2011-07-06 04:52 AM
Script: Clear start/due dates of selected item(s) dbyler OmniFocus Extras 0 2010-06-15 10:17 AM
Script to copy columns (and any selected rows) to new doc RobTrew OmniOutliner 3 for Mac 0 2010-06-07 02:47 AM
New Script - Selected Entourage EMail to Selected OF Task davidsomeone OmniFocus Extras 1 2009-03-06 12:22 PM


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


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