View Single Post
Happy to help! Checked with a coworker, who had these suggestions.

Quote:
Originally Posted by Newtdude View Post
Why does tell applicatation 'OmniFocus' / activate quick entry / end tell fail? Essentially this does nothing even though there is some indication within the community that this works although other folks state it doesn't but should. Is this by chance a bug?
There are 2 things going on here - you want to use "open" instead of "activate" and it turns out that Cocoa scripting isn't initialized until you need it, and "open" for some reason doesn't do so.

If you add a "get class" line to a script, though, that forces Cocoa Scripting to initialize, and the open command will then work as expected. (We filed a request to just automatically initialize scripting when the app launches, but until that makes it into the app, you'll want to use this workaround.)

Code:
tell application "OmniFocus"
	(get class of quick entry) -- Force Cocoa Scripting to initialize
	open quick entry
end tell

Quote:
Originally Posted by Newtdude View Post
Is there a less hacky way to expand the notes of each of the tasks in the Quick Entry window?
This should work:

Code:
tell application "OmniFocus"
	tell quick entry
		repeat with t in every tree
			set note expanded of t to true
		end repeat
	end tell
end tell
Quote:
Originally Posted by Newtdude View Post
Is there any better way to manipulate the task items in the quick entry?
Try this:

Code:
tell application "OmniFocus"
	tell quick entry
		select first tree
	end tell
end tell
Do those help?

Last edited by Brian; 2011-02-25 at 03:26 PM.. Reason: reformat whitespace, add parenthetical.