The Omni Group Forums

The Omni Group Forums (
-   OmniFocus Extras (
-   -   Shortcuts to Where in OF searches (

RobTrew 2012-01-31 11:29 PM

Shortcuts to Where in OF searches
An experimental feature in [URL=""]version .740 of Where in OF[/URL] which you are very welcome to test.

[B]NB these shortcut scripts currently only work from the script menu, LaunchBar, etc - don't try to run them from the OmniFocus toolbar - on which they seem to cause a freeze ...[/B]

If you place a copy of Where in OF (.740 and above) in your OmniFocus scripts folder:
You can then create very simple shortcut scripts, which jump straight to frequently-used searches, along the lines of:

[CODE]do shell script "osascript ~/Library/Scripts/Applications/Omnifocus/ \"tasks where (name contains <txt>) or (note contains <txt>)\""[/CODE]

As such scripts need to use the exact name of the WhereInOF app, it may be sensible to rename a copy of .app file, dropping the version affix, to, so that you can write:

[CODE]do shell script "osascript ~/Library/Scripts/Applications/Omnifocus/ \"tasks where (name contains <txt>) or (note contains <txt>)\""[/CODE]

rather than having to modify any shortcut scripts if you download a later version.
[INDENT][I]tasks where (name contains <txt>) or (note contains <txt>)[/I][/INDENT]
is a useful general string search, which will also find strings in project names and notes, and you may want searches which give a more date-based or status-based custom filtering.

Thanks to whpalmer4 for suggesting saved searches which could be fired off by simple scripts.


RobTrew 2012-02-01 02:42 PM

1 Attachment(s)
A general LaunchBar script for string searches which use Where In OF.

(Choose the script with a LaunchBar abbreviation, and then tap the space-bar to enter the string you want to search for).

Assumes that the Where In OF .app file has has the following path and name:
(Where ~ is a system-recognised abbreviation for your home folder)

[CODE]on handle_string(strQuery)
set str to do shell script ("osascript ~/Library/Scripts/Applications/Omnifocus/ 'tasks where (name contains \"" & strQuery & "\") or (note contains \"" & strQuery & "\")'")
end handle_string[/CODE]


All times are GMT -8. The time now is 06:02 PM.

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