The Omni Group
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!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Applescript for finding an OmniFocus project quickly Thread Tools Search this Thread Display Modes
You can use this script from LaunchBar, or on its own, to find a project quickly by typing a phrase or a few characters from its name.

LaunchBar: select the script in LaunchBar and tap the space bar to get a text field.

On its own: install the script in the OF toolbar, or in the OF script menu.
When the script is run, the user will be prompted to enter a part of the project name.

If there is only one match, the script will immediately switch the focus to the specified project. If there are several matches, the user is offered a list from which one or more choices can be made.

(Tip: for an alphabetic listing of all projects, just enter a percentage character %, or an underscore character _ on its own.

Wildcards generally: % can be used as a substitute for any number of characters in a project name, and _ can be used as a substitute for any single character.)

-- Ver 0.1 adds alphabetic sorting
-- Ver 0.2 defaults to opening a new window [this can be reset by editing pblnNewWin above to false]
-- Ver 0.3 brings OmniFocus to the front
-- Ver 0.4 fixes the handling of search strings and project names which contain double quotes
-- Ver 0.6 If no match found, dialog now offers to run an amended search or create a project


--

Last edited by RobTrew; 2012-08-01 at 08:34 PM.. Reason: Added link to script at http://bit.ly/FindOFProj
 
This is great! I've been looking for something like this for years. Is there any way to have it open a new window when it focuses on the project?
 
Quote:
Originally Posted by mpw View Post
Is there any way to have it open a new window when it focuses on the project?
I've amended the script (in the zip in the post above).

It now defaults to opening a new window.

(The old behaviour can be restored by editing the pblnNewWin property at the start of the script to false).
 
Modified, in the zip above, so that it brings OF to the front when you are using another application.
 
Quote:
Originally Posted by RobTrew View Post
Modified, in the zip above, so that it brings OF to the front when you are using another application.
More proof that the automatic software updater for Applescript I keep encouraging you to write would be time well spent :)
 
Quote:
Originally Posted by whpalmer4 View Post
More proof that the automatic software updater for Applescript I keep encouraging you to write would be time well spent :)
Mm ... How does one get it to update itself while running ?
Perhaps an updater updater ? And so on ? :)

(Oddly enough, I notice that there do seem to be precedents ...)
 
kudoz - just what I have been looking for :-)
 
Hi Rob,

nice pice of work there - just a few annoying things.

- dialog might be popped behind other windows is there any way to make the dialog grab focus
- launching from launchbar with a multiple result search seems to strand the resulting dialog to be without focus and hidden under multiple layers of windows

But it works brilliant from within OF :-)
 
Quote:
Originally Posted by ptorngaard View Post
- dialog might be popped behind other windows is there any way to make the dialog grab focus
- launching from launchbar with a multiple result search seems to strand the resulting dialog to be without focus and hidden under multiple layers of windows
I think that the focus issues should be fixed in this variant ('FindObject') which retains the earlier functionality but adds the option of adding a space and a t, c, or f after the search string to search for tasks contexts or folders rather than projects.

(Projects remain the default).

[In addition to the larger FindObject, I have also updated the more lightweight FindProject, at the start of this thread, to Ver 0.8, to fix the focus glitch.]

--

Last edited by RobTrew; 2011-04-04 at 09:41 AM.. Reason: Added note re FindProject08
 
I tried to modify this script to also include folders while searching (by doing an additional search on the Folder table). I was able to find the entry in the database, but was unable to focus it in OmniFocus. This is probably something that someone who understands Applescript better than myself could tackle with ease. Any takers?
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding things quickly (and with confidence) in OmniFocus RobTrew OmniFocus 1 for Mac 8 2012-10-05 07:34 AM
How do I *quickly* re-file a task to another project? eatmytag OmniFocus 1 for Mac 7 2009-09-01 06:34 AM
Dead stoopid AppleScript question: finding the tell target jporten OmniFocus Extras 1 2009-03-19 10:10 AM
Help finding iCal applescript DoktorMarkus iCal Sync 2 2008-07-08 12:29 PM
Applescript OmniFocus to focus on one project Lutin OmniFocus Extras 4 2007-09-20 02:52 AM


All times are GMT -8. The time now is 08:27 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.