Ken,
Thanks for all the help, well and doing most of the work. What I am struggling with now is to make sure I have the filters set correctly. I figured out how to set the sidebar but I want to show all remaining tasks as well. I think I should use either the set (selected task state filter identifier) to "remaining" statement of the available task state filter but both result in an error...
Code:
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
set MyProjectID to id of first item of MyProjectArray
set ThisProject to project id MyProjectID
set newW to make document window with properties {focus:{ThisProject}, selected view mode identifier:"project", search term:""}
set (selected smart group identifier of sidebar of newW) to "remaining-projects"
-- set (selected task state filter identifier) to "remaining"
end tell
end tell
end if
Thanks again for all your help!