How do you get the select command to work? I was writing a script to list all projects/SALs/groups without a default context, and got to the last step of letting the user go to a particular item, and can't get it to work: OmniFocus says project id blah of document id blah doesn’t understand the select message. I wrote some sample code for testing the select command in many combinations:
Any ideas?
Thanks,
David
Code:
tell application "OmniFocus"
set firstProject to project 1 of document 1
-- result: project id "pbV93_WpDMx" of document id "mHxuR5tEH1i"
set fpID to id of firstProject
-- result: "pbV93_WpDMx"
set fpClass to class of firstProject
-- result: project
display dialog fpID
select firstProject
--Error: project id "pbV93_WpDMx" of document id "mHxuR5tEH1i" doesn’t understand the select message.
--All of the following produce a similar error:
select {firstProject}
tell document window 1 to select {firstProject}
tell content of document window 1 to select {firstProject}
tell front document
activate
select {project id fpID}
select firstProject
select (firstProject)
select every item of {firstProject}
tell content of window 1 to select firstProject
tell content of window 1 to select {firstProject}
tell content of window 1 to select every item of {firstProject}
end tell
end tell
Thanks,
David





Linear Mode
