The Omni Group Forums

The Omni Group Forums (
-   OmniFocus 1 for Mac (
-   -   Get selected tasks with script? (

curt.clifton 2007-06-08 06:17 PM

Get selected tasks with script?
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:
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)

curt.clifton 2007-06-10 05:43 PM

OK, I figured out how to access the selected items:
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[/CODE]

All times are GMT -8. The time now is 07:30 AM.

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