The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Invoke Quick Entry by using Applescript (http://forums.omnigroup.com/showthread.php?t=14602)

Rogier 2009-11-24 09:17 AM

Invoke Quick Entry by using Applescript
 
Hi, is there a way to invoke the quick entry window, prepopulate it and display it by Applescript?

I've got this script to make a new task in my inbox, based on a selected e-mail. Because I want to add the proper project right away, I want to open the quick entry window, instead of directly putting stuff in my inbox.

On this forum I found this: [url]http://forums.omnigroup.com/showthread.php?t=4700[/url] But it seems rather old. Is there a way to do this, somehow?

Thanks in advance,
greets, Rogier

Brian 2009-11-24 10:47 AM

OmniFocus includes a Clipping service which does something along these lines - if you haven't already tried that, it may save you some work. It can be configured to add the clipped info to the Quick Entry window, and can also add a link back to the message in Mail.

The "Clipping material from other applications" page in the Help menu material is a good starting point on the feature - let us know if you have any other questions - happy to help!

whpalmer4 2009-11-24 12:24 PM

Brian,

I've noticed that the Quick Entry window no longer seems to respond to Applescript in the same way as it once did -- I can stuff actions in, but activate no longer makes the window visible. I see from the 1.7 release notes that some changes were made, but I haven't seen any code from anyone since then. [b]Obviously[/b] this change must have been tested, so if you could just post one of the simple test scripts (which would demonstrate the proper way to use the new verbiage), that would make us happy, and should be a task of trifling difficulty for you ;)

Ken Case 2009-11-24 01:04 PM

I believe there was a note about this in the release notes for OmniFocus 1.7… Ah, yes, here it is:

[QUOTE]Updated our AppleScript terminology to use "open quick entry" rather than "activate quick entry". Hopefully this will eliminate the problems people have occasionally encountered in trying to activate the app itself. (Compiled scripts which used our old activate verb may need to be recompiled, however!)[/QUOTE]

Hope this helps!

Rogier 2009-11-25 12:27 AM

Yes this helps, the following code is working now:

[CODE]
tell application "OmniFocus"
tell default document
set theContext to context myWFContext
tell quick entry
set theTask to make new inbox task with properties {name:theTaskTitel, note:theBody, context:theContext}
select {theTask}
open
end tell
end tell
end tell
[/CODE]
Thanks for your help! :)


All times are GMT -8. The time now is 12:52 PM.

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