The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   Get selected tasks with script? (http://forums.omnigroup.com/showthread.php?t=3786)

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:
[CODE]
tell application "OmniFocus"
tell document window of front document
tell content
return selected trees
end tell
end tell
end tell
[/CODE]

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:
[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[/CODE]


All times are GMT -8. The time now is 05:58 PM.

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