Thread: How to select?
View Single Post
OmniGraphSketcher release has kept me pretty busy, but David emailed us this week; I figured I'd post the useful bits of my reply here so other folks can find this in the future...

Quote:
Happy to help, and thanks for sending this in. Showed your email to the lead developer, who sent this back:
AS is funny. If you do "foo bar" then you are sending the command "foo"
to "bar" and in this case "project" doesn't handle "select".
See "close SomeWindow"; the window gets the command.
Wrapping foo in a list makes it not be considered and the receive of
the "tell" block gets it instead.

He sent along this script as an example:
tell application "OmniFocus 1.7"
tell default document
set MyProject1 to first project
tell front document window
tell sidebar -- or "tell content"
select {MyProject1}
end tell
end tell
end tell
end tell