OmniFocus URI Handler

OMNIFOCUS URI HANDLER

This applet enables you to create new tasks using an “x-omnifocus” URL. This is particularly designed to make it easy to add tasks from a web browser via a bookmarklet, without having to code a separate script for each browser. This also works in browsers that don’t support AppleScript. (I’m looking at you, Firefox!!!)

It also supports more advanced URLs containing context and project assignments that you’re likely to create from web page bookmarklets. This functionality can be utilized to make it easier to add OmniFocus tasks from other applications, shell scripts, etc., without having to hook into complicated AppleScript.

HOW TO CREATE PROPER URLS

All URLs must use the “x-omnifocus:” URI. You can have “whack whacks” after the URI, or just a colon, your choice. You must then follow the URI with the following methods:

x-omnifocus:newtask

This creates a new task. You can pass variables, following the example below. The only required element is “name”.

x-omnifocus://newtask?name=task name&project=project name&context=context name&note=task note text&quickentry=1/0

Project Name and Context Name will “fuzzy match” an existing project or context, so you don’t need a full or exact name.

a Quickentry value of “1” will cause the task to go into the Quick Entry window, which will be activated, rather than straight into the inbox.

x-omnifocus:parsetasks

This parses tasks either as a single task or as multiple tasks, per the usual parsing syntax. You can pass two variables, the text to parse and whether to parse it as a single task, as below. The only required element is the text to parse.

x-omnifocus://parsetasks?text=Text to Parse&single=1/0

A single value of “1” will make the tasks parse as single tasks. Otherwise, tasks will be parsed line-by-line, potentially as multiple tasks.

All strings should be URL encoded to eliminate any ambiguity in URLs and whatnot.

*** BOOKMARKLETS TO GET YOU STARTED ***

Here’s some sample bookmarklets you can put into your browser’s toolbar to make this all go:

Add the current page as a task with the page’s URL and any selected text as the note:

Send Page to OmniFocus

Same as above, but route to the Quick Entry window instead of directly into the inbox:

Send Page to OmniFocus Quick Entry

Parse tasks in the selection:

Parse Selection

NOTES

The HTML entity decoding routine falls down on certain characters, particularly Unicode characters.

If you use the quick entry window with the “newtask” method, the project and context values will be ignored, as these are not scriptable in the quick entry window.

VERSION HISTORY

• 1.0 - 06/20/2008: Initial release. Supports parsetasks, newtask

AttachmentSize
OmniFocus URI Handler46.21 KB

Great Firefox fix for Omnifocus

Hi there, Thanks for making this great script so I can keep using Firefox with Omnifocus. I had swapped back to Safari because I couldn’t clip web snippets into Omnifocus. But with your scripts I now can! One question though - on some pages when I use the Quick Entry option it doesn’t open the quick entry window but comes up with an error “Unable to locate the object to select. (3)” But when I open the quick entry window manually, the web clipping is saved there ready for me to edit. Any ideas how I can get this to work. PS it does work on some webpages. thanks.

Great Firefox fix for Omnifocus

Hi there, Thanks for making this great script so I can keep using Firefox with Omnifocus. I had swapped back to Safari because I couldn’t clip web snippets into Omnifocus. But with your scripts I now can! One question though - on some pages when I use the Quick Entry option it doesn’t open the quick entry window but comes up with an error “Unable to locate the object to select. (3)” But when I open the quick entry window manually, the web clipping is saved there ready for me to edit. Any ideas how I can get this to work. PS it does work on some webpages. thanks.

Great Firefox fix for Omnifocus - but a question...

Hi there, Thanks for making this great script so I can keep using Firefox with Omnifocus. I had swapped back to Safari because I couldn’t clip web snippets into Omnifocus. But with your scripts I now can! One question though - on some pages when I use the Quick Entry option it doesn’t open the quick entry window but comes up with an error “Unable to locate the object to select. (3)” But when I open the quick entry window manually, the web clipping is saved there ready for me to edit. Any ideas how I can get this to work. PS it does work on some webpages. thanks.

thanks and a suggestion

First, thanks for the app and bookmarks. I use Firefox and this is def. needed. Second, for those that aren’t as browser/app savvy it would be good to provide more info on how to install/configure this stuff. What I did was drag the OmniFocus URI handler app to my Applications folder and then manually created a bookmark in Firefox by using the copy link location function via the cntrl-mouse click in either Safari or FF. Then in FF I went to the bookmark manager and manually created a bookmark whose location was the pasted contents of the copied link.

thanks and a suggestion

First, thanks for the app and bookmarks. I use Firefox and this is def. needed. Second, for those that aren’t as browser/app savvy it would be good to provide more info on how to install/configure this stuff. What I did was drag the OmniFocus URI handler app to my Applications folder and then manually created a bookmark in Firefox by using the copy link location function via the cntrl-mouse click in either Safari or FF. Then in FF I went to the bookmark manager and manually created a bookmark whose location was the pasted contents of the copied link.

great app

Thanx for this addon. I was looking for this and now i can finaly use it.

Keep up the good work!

greetings from Slovenia.

Ales

good post…i was just

good post…i was just wondering about this the other day!

auto insurance

Excellent fix. Thanks!

Excellent fix. Thanks!

Post new comment

The content of this field is kept private and will not be shown publicly.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.