I could use some help modify a script that I had a lot of help with. The script below finds a project that starts with a name that I enter into the dialog. I would like to do something similar but at the folder level. What I would like to do is type in the name of the folder, then have it open a new window with just that folder and all the available and remaining projects showing.
Can anyone help?
Here is the original script:
tell application "OmniFocus"
set MyDoc to default document
tell MyDoc
display dialog "Enter Project to Jump to" buttons {"Cancel", "Jump"} default button 2 default answer "" with title "Jump"
if button returned of result is "Jump" then
set ProjectString to text returned of result
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 of content of newW to "incomplete"
-- set selected task state filter identifier of content of newW to "all"
activate
end if
end tell
end tell
Can anyone help?
Here is the original script:
tell application "OmniFocus"
set MyDoc to default document
tell MyDoc
display dialog "Enter Project to Jump to" buttons {"Cancel", "Jump"} default button 2 default answer "" with title "Jump"
if button returned of result is "Jump" then
set ProjectString to text returned of result
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 of content of newW to "incomplete"
-- set selected task state filter identifier of content of newW to "all"
activate
end if
end tell
end tell