The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   OmniFocus URI Handler (create tasks via URL) [See Omni note on pg 5!] (http://forums.omnigroup.com/showthread.php?t=8251)

jmca 2010-02-24 07:00 AM

Just a quick update. I changed the makeInboxTask function, a bit of a sloppily re-write, but it now works with a project:

[CODE]
on makeInboxTask(theName, theProject, theContext, theNote)
tell application "OmniFocus" to tell default document
set theTask to make new inbox task with properties {name:theName}
if theNote is not missing value then set note of theTask to theNote
if theContext is not missing value then set context of theTask to theContext

if theProject is not missing value then
set theProject to project theProject
set assigned container of theTask to theProject
compact
end if
end tell
end makeInboxTask
[/CODE]

jmca 2010-02-24 07:07 AM

Re-write again for context:


[CODE]
on makeInboxTask(theName, theProject, theContext, theNote)
tell application "OmniFocus" to tell default document
set theTask to make new inbox task with properties {name:theName}
if theNote is not missing value then set note of theTask to theNote

if theContext is not missing value then
set theContext to context theContext
set context of theTask to theContext
end if

if theProject is not missing value then
set theProject to project theProject
set assigned container of theTask to theProject
compact
end if
end tell
end makeInboxTask
[/CODE]

kaijin 2010-02-26 05:31 AM

Issues with Send to Quick Entry script:

In Firefox 3.6, if OF is hidden:
-Script calls QE and new task is created, but QE does not have focus. You must click on a field to edit or save, which calls the OF main window behind QE.

In Firefox 3.6, if OF is minimized or not the frontmost window:
-Script calls QE and new task is created, but QE does not have focus. You must click on a field to edit or save, which calls the OF Inspectors palette.

I believe this began after updating to Firefox 3.6. Similar behavior occurs in Safari 4.0.4, however. The only difference is that QE receives focus and the cursor is active in the Name field of the new task (but the OF main window or the Inspectors window is still called).

This has been observed in 1.7.5 and 1.8sp (v77.46 r126553)

(Incidentally, the Send to OF Quick Entry bookmarklet that was posted in the 1.8 sneaky peak thread does not function for me in Firefox 3.6, either. In Safari 4.0.4, it produces the same behavior as above. Feedback has been sent to the support ninjas).

[QUOTE=jmca;73923]Nice job on the script!! 1 prob, for some reason it will not recognize the &project parameter. Everything works except that it ignores this parameter and chucks it in the inbox, both with quickentry 1 or 0.[/QUOTE]
Additionally, I'm not having the issue mentioned by jmca. New tasks created via QE are correctly placed in their assigned project and context.

iNik 2010-05-26 01:01 PM

NOTE: I've stopped developing this script because as of OF 1.8 (currently in SneakyPeekdom), this functionality is built-in through omnifocus://add URLs.

However, here is a snazzy bookmarklet that does the same thing with OF 1.8, including saving the selection. Just drag the link below to your toolbar:

[URL="javascript:window.location='omnifocus:///add?note='+encodeURIComponent(window.location+'\n\n')+encodeURIComponent(getSelection())+'&name='+encodeURIComponent(document.title)"]Send to OF[/URL]

Or the raw JS:

[CODE]javascript:window.location='omnifocus:///add?note='+encodeURIComponent(window.location+'\n\n')+encodeURIComponent(getSelection())+'&name='+encodeURIComponent(document.title)[/CODE]

Brian 2010-10-20 03:49 PM

We were contacted today by a developer wondering if this was the best way to satisfy their customers' request for adding "Send to OmniFocus" features to their app.

There's a different method which we would actually recommend; folks can read about it in [URL="http://forums.omnigroup.com/showthread.php?t=14986"]this thread[/URL].

Just wanted to head off any potential future confusion at the pass. (Editing the thread title to that end, as well.)


All times are GMT -8. The time now is 02:23 PM.

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