Quick Open - System Wide Shortcut

Love the new quick open feature. Is there a way to make it a system wide shortcut that opens OF2 when it is closed?

Bonus point if you can help add an alfred workflow command as well :)

3 Likes

What are you after exactly ? I have a system wide kbd shortcut that open up Quick entry for me no matter what app I am in. Add the below to Automator and save it note that you want Service Receives set to no input and in Any Application. This should be save as a service. Once saved you can bring up Sys Prefs/Keyboard and then click services and you should see this service listed at the bottom from there you can set the keyboard shortcut that you want. Adding this to Alfred would be relatively easy as it supports Applescript but begs the question why unless you just like everything in one place. Note that if OF the app is closed hitting the shortcut will open OF2 and then bring up the QE popup.


tell application "OmniFocus"
tell quick entry
	make new inbox task
	open
end tell
tell application "System Events"
	keystroke tab
end tell

end tell

2 Likes

Quick Entry is already exposed system-wide with the Send to Inbox service.

It would be great to have the Quick Open box also accessible systemwide, for quickly opening projects or perspectives already created, rather than adding new tasks.

I guess in GTD-speak, the first is ubiquitous capture, so the second might be ā€œubiquitous recallā€.

If you use Keyboard Maestro, a system wide shortcut for Quick Open is easy to create.

1 Like

If OmniFocus is running, you can trigger Quick Open by launching the following script:

tell application "System Events"
    tell process "OmniFocus"
        click menu item "Quick Openā€¦" of menu "File" of menu bar item "File" of menu bar 1
    end tell
end tell
1 Like

Not a system-wide shortcut, but I use Launchbar and adapted @bmorganā€™s script to take text from Launchbar and plop it right into Quick Open. Itā€™s not super-fast (a half second), and you miss out on find-as-you-type, but it works if you know where you want to go.

    on handle_string(msg)
	
	
	tell application "System Events"
		tell process "OmniFocus"
			click menu item "Quick Openā€¦" of menu "File" of menu bar item "File" of menu bar 1
		end tell
		keystroke msg
	end tell
	
end handle_string

Save it to ~/Library/Application Support/Launchbar/Actions/.

2 Likes

Is there ANY keyboard shortcut for Quick Open even within OF2? If so I canā€™t figure out what it isā€¦

Look under ā€œEditā€ ā€œFileā€ in the OF menubar ā†’ āŒ˜O

1 Like

thanks for the tip! (itā€™s not under the edit menu though)

This is a great script. Iā€™m not a scripting guru but have this working effectively through Keyboard Maestro. Is there any way after searching to bring Omnifocus to the front as the focused application automatically? This would make the script perfect.

UPDATE: Figured out how to do it, at least at the same time the Quick Open panel opens:

tell application ā€œOmnifocusā€
activate
end tell

Wow this is awesome - I did this with Alfred2 in seconds. I added a global shortcut key and used the following script:

on alfred_script(q)
  tell application "System Events"
    tell process "OmniFocus"
        click menu item "Quick Openā€¦" of menu "File" of menu bar item "File" of menu bar 1
    end tell
end tell
end alfred_script
2 Likes

hey grant, sorry, not great at the alfred scripting - can you detail step by step process of creating the alfred script/workflow?

thanks in advance

@gtdwannabe I exported the workflow I created that binds ā€œOption-Command-Oā€ as a global hotkey. You can change this as you need. Also, you may need the powerpack. Iā€™m using Alfred 2.3.

Link: https://www.dropbox.com/s/xp7tt3rhm8g9lxo/Omnifocus2%20Quick%20Open.alfredworkflow

Grant

2 Likes

Thanks for this script! Iā€™ve hacked together a slight change to get it to switch to OmniFocus, too. Iā€™m no AppleScript whizz, but it works for me:

on alfred_script(q)
    tell application "System Events"
        tell process "OmniFocus"
            click menu item "Quick Openā€¦" of menu "File" of menu bar item "File" of menu bar 1
        end tell
    end tell
    tell application "OmniFocus" to activate the default document
end alfred_script

(The last line of the alfred script is the new bit.)

1 Like

Thanks! Works like a charm! Your update makes the script that much better.

1 Like

This is all terrific stuff and works well for calling OF from alfred from any application. Still not solving the open omnifocus when closed. I think with minimal work, we could get there.

Since I posted, I discovered Shawn Blancā€™s Oopsie Focus (which I highly recommend). If we adapt shawn blancā€™s scipt, I think this will wind up being quite a nice piece of team scripting here. I tried to figure it out myself, but lack the skills.

If you want to input text into the quick open text field, hereā€™s the code. Would you guys mind if I packaged this into an Alfred Forumā€™s post?

on alfred_script(q)
    tell application "System Events"
        tell process "OmniFocus"
            click menu item "Quick Openā€¦" of menu "File" of menu bar item "File" of menu bar 1
            set value of text field 1 of front window to q
        end tell
    end tell
    tell application "OmniFocus" to activate the default document
end alfred_script
2 Likes

Thanks, this works perfectly while OF is open. Do you know how to incorporate the oopssie focus script so that it works when it is not open?

Also, the script from this thread would be a candidate for similar treatment:

Iā€™m thankful for the script development here. I took the lazy approach and installed Fastcripts which lets you assign global hotkeys to scripts (10 total in the free version). That way I have the hotkey set to the same quick capture combo I use when OF is open.

And the ā€œOne Click Search Allā€ thread you linked was golden. Got those working as well and love searching in two steps from the keyboard.

1 Like

Have you done this yet? Could you post a link to this workflow? Thank you very much.