View Single Post
I've run into a number of strange bugs when calling OmniFocus with AppleScript. I'm working on some sort routines to organize projects alphabetically, and they work pretty well, except that I keep running into a bug when I try to move certain items to the end of their container. Here's an example:
tell application "OmniFocus" to tell document window 1 of document 1
set xT to tree 1 of library of sidebar
set xV to value of xT
set xC to container of xV
move xV to after last section of xC
end tell
I get an Apple Event Handler Failed when I run this script.

This does work, I think, outside of the root level of the library, but I can't say for sure that it does.

Also, is there any way to directly re-arrange trees? I'm having to walk back through value -> container, when it would be a lot easier to just go from the tree and re-arrange it.