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