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.

To install the bookmarklets, you can either drag the link to your browser’s toolbar, or right-click on the link and choose “Add link to bookmarks” (or some equivalent, depending on your browser of choice). You can use them all, or just the one that works the way you want it to.

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 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

Excellent fix. Thanks!

Excellent fix. Thanks!

fashion jewelry

wholesale jewelry ,AYpearl.com supply vast kinds of styles fashion jewelry,mainly engage in promote handmade jewelry and wholesale handmade jewelry,such as wholesale pearl wholesale crystal,wholesale gemstone,wholesale costume jewelry,also wholesale fashion jewelry like wholesale crystal jewelry,wholesale beads,wholesale turquoise,wholesale coral,wholesale costume jewelry ,shell jewelry,costume jewelry and discount jewelry, jewelry wholesale, just on AYpearl jewelry store.

Thanks!

Thanks for creating this! It works flawlessly.

https://launchpad.net/~tamifl

https://launchpad.net/~tamiflu

Error message

Can’t get text 6 through 5 of “name=”. (-1728)

Would love this to work for me. I am using the Flock browser which is based on Firfox.

Thank you.

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.