Great Stuff, thanks Ken and Craig
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!
|
|
FAQ | Members List | Calendar | Today's Posts | Search |
Applescript request - Jump to Project | Thread Tools | Search this Thread | Display Modes |
Member
2008-05-21, 07:00 PM
Great Stuff, thanks Ken and Craig
Post 11
|
Member
2008-05-26, 07:04 AM
So, is this working now? It sounds like a great idea. I was wondering if someone could copy/paste the code— it seems like there have been a few additions and I'm not quite sure where to add those.
Thanks, Steve
Post 12
|
Member
2008-05-26, 07:13 AM
Quote:
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 of content of newW to "incomplete" -- set selected task state filter identifier of content of newW to "all" activate end tell end tell end if Code:
on handle_string(ProjectString) if ProjectString is not "" then 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 of content of newW to "incomplete" -- set selected task state filter identifier of content of newW to "all" activate end tell end tell open location "x-launchbar:hide" end if end handle_string Thanks again for all the help. George
Post 13
|
Member
2008-05-26, 08:45 AM
I also prepended this
Code:
tell application "Quicksilver" to activate
Post 14
|
Member
2008-07-01, 07:03 AM
Quote:
Post 15
|
Member
2008-07-01, 07:15 AM
I just meant the first script in post #13 immediately above mine. Before the "display dialog..." line, I added "tell application Quicksilver to activate".
Post 16
|
Member
2009-10-13, 07:28 PM
Could someone help me figure out what to do with the pasted text. . . I am trying to get it to work with launchbar. Do I save the text as an applescript or something? If you could nudge me in the right direction, I would appreciate it.
Steve
Post 17
|
Steve,
Below is an updated version of the script for LaunchBar. This one displays a dialog box if there are multiple matching projects, letting you choose between them. To use with LaunchBar you need to:
To trigger the script:
Cheers, Curt Code:
(* Code due to gcrump (George) on the OF Extras forum. http://forums.omnigroup.com/showpost.php?p=37275&postcount=13 Updated to handle multiple projects by Curt Clifton. *) on run {} my handle_string("220") end run on handle_string(ProjectString) if ProjectString is not "" then tell application "OmniFocus" set MyDoc to default document tell MyDoc set MyProjectArray to complete ProjectString as project maximum matches 10 if (count of MyProjectArray) is 0 then beep return else if (count of MyProjectArray) > 1 then set choices to my getNames(MyProjectArray, {}) set choice to choose from list choices without empty selection allowed set MyProjectID to my getIDByName(MyProjectArray, item 1 of choice) else set MyProjectID to id of first item of MyProjectArray end if 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 tell end tell open location "omnifocus:" end if end handle_string on getIDByName(XMLRecords, theName) if XMLRecords is {} then beep error "No record selected" end if set oneName to (name of item 1 of XMLRecords) log oneName if oneName is theName then return id of item 1 of XMLRecords else return getIDByName(rest of XMLRecords, theName) end if end getIDByName on getNames(XMLRecords, Accum) if XMLRecords is {} then return Accum else return getNames(rest of XMLRecords, ({name of (item 1 of XMLRecords)} & Accum)) end if end getNames
__________________
Cheers, Curt
Post 18
|
Member
2009-10-14, 09:52 AM
Curt, thank you for explaining how to set this up! That is a great tool. I love it.
Post 19
|
Member
2009-11-07, 02:44 AM
Curt, Awesome update to the script. Much better application. How Can I get it to only search folder names instead of Project Names?
Post 20
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Keyboard shortcut to jump to a particular project? | ecf | OmniFocus 1 for Mac | 6 | 2011-07-06 03:09 PM |
Jump to Project | sprocketjockey | OmniFocus 1 for Mac | 5 | 2011-05-10 07:55 AM |
Feature Request : Jump quickly from action to project | alexjrice | OmniFocus for iPhone | 12 | 2011-01-02 02:11 AM |
A way to jump from a task to its home project? | jkorentayer | OmniFocus 1 for Mac | 4 | 2009-10-19 01:09 PM |
jump to project from action? | hexsprite | OmniFocus for iPhone | 4 | 2008-08-15 05:54 PM |