Jump to content
danielbleyer

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

Share this post


Link to post

-  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

Share this post


Link to post

I can not make this script work in Alfred… I have Alfred2 and power pack. I bought Alfred2 just for scripts, but apparently I'm missing something. :/ Any help would be greatly appreciated.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...