The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Send an action from Alfred.app to OmniFocus (http://forums.omnigroup.com/showthread.php?t=21781)

jhncbrwn 2011-08-01 07:40 PM

Send an action from Alfred.app to OmniFocus
 
1 Attachment(s)
Running with Crayons just released their latest version of [URL="http://www.alfredapp.com/"]Alfred[/URL] which supports extensions.

On of the first things I did was to write an applescript which adds an action directly to OmniFocus.

If you would like to be able to do the same:

In the preferences, under extensions, add a new applescript with the following details:

Title: Add to OmniFocus
Description: Action! @Context ::Project #Start #Due $Duration //Note
Keyword: of
Options: Background checked, Action unchecked
Applescript:

[CODE]on alfred_script(q)
tell application "OmniFocus"
tell default document
parse tasks with transport text q
end tell
end tell
end alfred_script[/CODE]

The script uses the same syntax as the syntax which is used to send an email to OmniFocus
(Look under under OmniFocus Help for: processing mail messages into actions).

To add "Burn the body" directly to your inbox type:

[I]"of Burn the body"[/I]

To add the action "Get milk" to the project "Groceries" with the context "Errands" type:

[I]"of Get Milk @Errands ::Groceries"[/I]

Regards,

J.

vfatia 2011-08-05 03:30 PM

Really nice!

For those running alfred there is now an extension for running scripts from the scripts folder (~/Library/Scripts). Works really well with omnifocus.

You can get it here: [url]http://techpragmatist.co.uk/content/applescripts-and-alfred[/url]

menza 2011-08-15 01:03 PM

How do you enable extensions. I have the newest version and don't see that option.

CatOne 2011-08-16 04:40 PM

[QUOTE=menza;100605]How do you enable extensions. I have the newest version and don't see that option.[/QUOTE]

You need the PowerPack. This requires the paid version, download from the Alfred web site. It's not available in the Mac App Store version of Alfred.

Alexei 2011-10-22 11:29 AM

I tried and i does not work for me.... I am running Lion 10.7.2 and latest version of Alfred.

NorCalPaul 2011-11-09 10:28 AM

kewl! works like a charm.
Thank you,
Paul

winstonsmith 2011-11-26 12:45 PM

Works as advertised. Nifty - thanks.

mat_rhein 2012-01-09 02:23 AM

cool one...
 
Thanks for the well- explained extension!

cheers, mat

kastorff 2012-01-25 06:54 AM

OmniFocus crashes if it isn't already running when I use this extension. Anyone else seeing this?

byamabe 2012-02-06 09:40 AM

Dirty Hack
 
I had the same behavior when OmniFocus was closed.
I found two non-optimal solutions which involve adding lines after "tell application":
1.
activate

Problem with this is that OmniFocus will always be brought to the front.

2.
launch
delay 1

Problem with this is that the "delay 1" is dependent on the system and is not guaranteed not to crash in the same way. It would be best to ensure that OmniFocus is ready to receive commands, but I don't know enough AppleScript or have the time to do further digging.


All times are GMT -8. The time now is 04:43 PM.

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