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

 
Snow Leopard mail rule bug? Thread Tools Search this Thread Display Modes
Hi, all. Could someone verify something for me so I know I'm not going crazy?

I've written an applescript to process messages from Mail.app and create a project & actions based on the mail content. The script is called from a mail rule.

However, Mail only sends Omnifocus the expected message if I apply the rule manually. If a new mail item automatically triggers the rule, Mail sends along the next most recent item in my inbox (in other words - the message that came in BEFORE the message that's actually triggering the rule).

Is this a bug or did I mess up the script? Here's the basic loop that I use in my script:

Code:
on perform_mail_action(theData)
	tell application "Mail"
		set theSelectedMessages to |SelectedMessages| of theData
		set theRule to |Rule| of theData
		repeat with a from 1 to count theSelectedMessages
			set thesubject to subject of item a of theSelectedMessages
			display dialog thesubject
		end repeat
	end tell
end perform_mail_action
Thanks for your help!
 
Here's the mail rule I'm using:

Code:
If all of the following conditions are met:
Subject Begins with "trigger script"

Perform the following actions:
Mark as Flagged
Run Applescript (path)
When this rule is enabled Mail finds the incoming message "trigger script" and marks it flagged. So I thinks to myself "The messages that Mail.app flags and the messages that Applescript receives must be identical, right?"

But it doesn't look that way. The applescript creates a dialog box and prints some other email's subject.

This is my first attempt at applescript. I'm totally stumped. :confused:

Any ideas?

Thanks

Last edited by Mark Stanczak; 2009-10-20 at 10:58 AM..
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Behavior of mail clipping under Snow Leopard bradg OmniFocus 1 for Mac 2 2010-03-26 06:31 AM
Quicklook on Snow Leopard korm OmniGraffle General 2 2009-12-02 12:14 PM
Snow Leopard Support? kohlgill OmniDictionary 1 2009-09-18 06:30 PM
Is OmniFocus Ready for Snow Leopard? SpiralOcean OmniFocus 1 for Mac 1 2009-08-28 04:17 AM
Snow Leopard grangej OmniFocus 1 for Mac 4 2009-08-08 01:31 PM


All times are GMT -8. The time now is 11:24 AM.


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