Last active
December 24, 2015 10:49
-
-
Save bjmorgan/6786479 to your computer and use it in GitHub Desktop.
AppleScript for triggering a search in OmniFocus from LaunchBar. Accepts text items from Launchbar (hit space, or send a text item to the script), or prompts the user for a search query.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on handle_string(the_string) | |
if (length of the_string is 0) then | |
display dialog "Search OmniFocus for:" default answer "" | |
end if | |
open location "x-launchbar:hide" | |
my search_in_omnifocus(the_string) | |
end handle_string | |
on search_in_omnifocus(the_search_string) | |
tell application "OmniFocus" | |
activate | |
tell front window | |
try | |
set search term to the_search_string | |
end try | |
end tell | |
end tell | |
end search_in_omnifocus | |
display dialog "Search OmniFocus:" default answer "" | |
set the_string to text returned of result | |
my search_in_omnifocus(the_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment