The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
Scripting QuickEntry Thread Tools Search this Thread Display Modes
I see some AppleScript dictionary support for QuickEntry in the latest build. Anyone figured out how to open the QuickEntry window from AppleScript yet?
__________________
Cheers,

Curt
 
Heh; I was just about to come post something about this.

Here are some examples:

Code:
tell app "OmniFocus"
   tell quick entry
       -- activate the quick entry panel for the default document
       -- unlike the UI hook this won't add the default empty task
       activate
   end
end
Code:
tell app "OmniFocus"
   tell quick entry
       make new inbox task with properties {name:"foo"}
       select {task 1}
       save -- saves, closes and clears the panel as if you'd hit the 'Save' button
   end
end
Code:
tell app "OmniFocus"
   tell quick entry
       close saving no -- discards the data; yes saves
   end
end
Code:
tell app "OmniFocus"
   tell quick entry
       close -- with no 'saving' specified, just hides the panel w/o saving or reverting the data.
   end
end
The 'delete' command and tree suite should be supported too (quick entry is a subclass of tree in the script suite), though I've only tested the select command so far.

All the rich text & attachment scripting should work too on task notes as well, but it's received only limited testing in the Quick Entry configuration (the code is nearly all shared, so if something is busted it should be pretty easy to fix).

I still need to support the 'complete' command and as of yet, trying to assign a context or project to an inbox item will not work if you try to mix-n-match objects from different documents (where quick entry acts like a little document of its own). You could probably work around this (untested) by finding the project/context you want in the main document and then doing something like:

Code:
   tell quick entry
       set context of MyTask to context id (id of MyContextFromDocument)
   end

I would like to find time to auto-map these sorts of assignments, but I don't know if I'll find time before 1.0.

Last edited by Tim Wood; 2007-10-09 at 08:45 PM..
 
I should also mention that what I'm working on now is a clipping service with support for post-clipping script handlers to make cleanup/extensions to the clipped text based on the active application's state.

I'm out of town next week and I don't know if this will be committed before I go -- hopefully!
 
Anyone have any luck with this? I tried modding Curt's Mail script to open the Quick Entry and just start a new entry with title & note, but it's not working for me - even just opening the Quick Entry doesn't seem to work!

I get:
Code:
	open quick entry
		"OmniFocus got an error: Can't make quick entry into type file."
 
I get the same thing for open. I can get the 'make new inbox task' command to work on the QE window. Select and save also work. I opened the QE window using the hotkey, then ran this script:

Code:
tell application "OmniFocus"
	tell quick entry
		make new inbox task with properties {name:"foo"}
		select tree 1
	end tell
end tell
That part works. I'm guessing that Tim might have missed one commit before heading out so that the open command isn't implemented. I'll report via Send Feedback.
__________________
Cheers,

Curt
 
Bah; that's what I get for posting and then leaving for a week.

It turns out this works fine on my machine running 10.5, but not so much on 10.4 and I failed to run the test suite on 10.4 before claiming this worked.

Sorry for the false alarm -- I'll look into it.
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
language foes in QuickEntry window fzurell OmniFocus 1 for Mac 0 2011-11-29 03:03 AM
create new project in quickentry reimannje OmniFocus for iPad 5 2011-10-06 11:59 PM
Finally, Standalone QuickEntry and More! (Anxiety + OmniFocus) devn OmniFocus Extras 3 2008-09-28 06:19 PM
Creating Nested Projects from QuickEntry Saaby OmniFocus 1 for Mac 4 2008-08-11 09:58 AM
Something Dumb I'm doing - quickentry window question filmgeek OmniFocus 1 for Mac 3 2007-10-09 07:48 PM


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


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