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 Search Today's Posts Mark Forums Read

 
AppleScript that adds Waiting For emails from Mail.app (delegated tasks) to OmniFocus Thread Tools Search this Thread Display Modes
Quote:
Originally Posted by whpalmer4 View Post
I bet the try block containing the tell application OmniFocus block is failing, and if you look in your system.log file with the Console application, you may see the reason why. Search for "outboxrule".
I looked in the console and I could not find a message containing "outboxrule"
. I don't think that it is the try block that is failing because I placed a "display dialog" just before the tell omnifocus line and that gets displayed when the script runs.
 
Does the display dialog "tell omnifocus" line get executed?

Puzzling...I don't have the MAS version of Growl, nor do I have Mail Act-on, so I can't really poke around as much as I would like...

If you run this script and don't have OmniFocus running, does it launch OmniFocus correctly?
 
If I quit OF and then run the script, OF launches but the email is not in the inbox
 
What about the display dialog statements inside the tell application "omnifocus" block? Do they produce any output?
 
No they don't
 
And you've looked at the All Items perspective and verified that they didn't end up anywhere in your database, right?

I'd be tempted to comment out the "try" statements, and to perhaps use a different app for doing the display dialog stuff. Once you've commented out the "try" statements, change the myWFContext definition to something that is not in your database, which should cause a runtime error when it hits the "set theContext to context myWFContext" statement. That'll prove that you've set up communication with OmniFocus.
 
Okay. I will give it a try tomorrow and let you know the result. Thank you
 
I found the problem. The script was falling over at these lines:


Code:
if myProject is not null then
	set theProject to project myProject
	move theTask to end of tasks of theProject
end if
Once I removed these lines, it worked. I was not setting a project within mailtags but leaving it blank. Upon closer inspection of the applescript, I can't see where the myProject variable is being set - maybe that was the problem.
 
I have the same lines of code in my script along with


Code:
using terms from application "MailTagsScriptingSupport"
			set theDueDate to (due date of theMessage) as date
			set theDueDate to my setDueDate(theDueDate)
			set myProject to project of theMessage
	end using terms from
The item gets created in the right context but it's never put in the chosen project. Does anyone have any ideas?
 
You need to actually insert the action in the project, with language like the "move theTask to end of tasks of theProject" that pdoak stripped out. In pdoak's case, the failure was indeed because theProject was not set to a valid value.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to deal with delegated or "waiting for" actions bisimpson Applying OmniFocus 20 2013-02-27 06:52 AM
Delegated tasks? mattw OmniFocus 1 for Mac 35 2011-10-07 02:10 PM
Sync with Omnifocus on Mac adds completed tasks.. ohla313 OmniFocus for iPhone 7 2011-06-13 08:50 AM
Script to add delegated tasks from entourage to "Waiting" context in OmniFocus tarun101 OmniFocus Extras 1 2010-05-21 08:09 AM
Adding Tasks Via Send To OmniFocus Mail Rule, Mailtags, & Mail Act-On reuben OmniFocus 1 for Mac 0 2007-11-18 06:07 PM


All times are GMT -8. The time now is 09:41 AM.


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