Jump to content

OopsieFocus is a workflow to have access to OmniFocus' Quick-Entry Pane when the application isn't running.


Recommended Posts

Hello,

 

a while back I found a little AppleScript for OmniFocus users. The author is Shawn Blanc.

 

It is used to have access to the Quick-Entry Pane, even if OmniFocus isn't running at the moment.

 

Set-up: the workflow should be triggered with the same keyboard shortcut you use to activate the OmniFocus Quick-Entry Pane.

 

This way you won't have to worry about starting OmniFocus to use your Quick-Entry Pane, it's always ready!

 

I just put the script into a workflow and added a trigger. The only thing you have to do is choose the shortcut and you're done. 

 

download the workflow here:

https://www.dropbox.com/s/1wnhuk0jr3v8ot8/OopsieFocus.alfredworkflow

 

Credits go to:

http://shawnblanc.net/2011/06/oopsiefocus/

 

Hope you enjoy this, (it's pretty useful if you happen to use the Quick-Entry Pane as often as I do)

 

Daniel.

Edited by danielbleyer
Link to comment

-  In an empty workflow press the "+" in the top right of the sheet. From the drop down select "Actions" -> "Run Script"

-  in the new bloc that shows up, double-click and select language to the use the /usr/bin/osascript interpreter.

-  Leave all escaping options alone (checked/selected) and paste the following script into the appropriate area.

 

Now add a hotkey field with the "+" button again, Select "Triggers" and then "Hotkey"

Double click the new hotkey bloc and put in a combination. After that connect the two items. Hotkey----->Run Script

 

See the credits link in the first post? http://shawnblanc.net/2011/06/oopsiefocus/ 

 

The script is verbatim from shawn's site and no modification was necessary to make it work with Alfred. Should be good to go. No work, no problem. 

set GTDAppName to "OmniFocus"
global GTDAppName
set GTDAppToUse to FindRunningGTDApp()
if (GTDAppToUse is null) then
	set GTDAppToUse to "OmniFocus"
end if

-- Is OmniFocus running?
on AppIsRunning(GTDAppName)
	tell application "System Events"
		return (count of (application processes whose name is GTDAppName)) is not 0
	end tell
end AppIsRunning

-- If OmniFocus is running, do nothing.
-- If OmniFocus is not running, launch it and bring up the Quick Entry Panel.
on FindRunningGTDApp()
	if AppIsRunning(GTDAppName) then
		null
	else
		tell application "OmniFocus"
			activate
			tell quick entry
				open
				make new inbox task
				tell application "System Events" to keystroke tab
			end tell
		end tell
	end if
	return null
end FindRunningGTDApp
Link to comment
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...