View Single Post
@ Craig - Will do.

@ Ken - I'm stuck and have messed with it all morning. Here is what I have, simple no error handling yet. Not much more than what you gave me. I can't figure out how to pull anything from MyProjectArray. In the Result section of script editor it is setting the variable right. For example if I type in "Spotlight" I get:

{{xml:"Customers : Permabit : Permabit <span class=\"match\">Spotlight</span> Article", score:225, id:"hMhoYt5pZ2e", name:"Customers : Permabit : Permabit Spotlight Article"}}

My assumption is that if I can figure out how to address the array, I can access the ID property and use that to show the Project in a new window. My goal was to add to the script the commands:

set MyProjectID to id of MyProjectArray
set newW to make document window with properties {focus:{MyProjectID}, selected view mode identifier:"project", search term:""}

to the script below. But I get an error on the set MyProjectID statement. If I just use the MyprojectArray in the {focus} I get an error there too...

display dialog "Enter Project to Find" buttons {"Cancel", "Find"} default button 2 default answer "" with title "Project Find"
if button returned of result is "find" then
set ProjectString to text returned of result
tell application "OmniFocus"
set MyDoc to default document
tell MyDoc
set MyProjectArray to complete ProjectString as project maximum matches 1
end tell
end tell
end if


Any help would be appreciated... Thanks.

Last edited by gcrump; 2008-05-21 at 07:27 AM..