Applescript in El Capitan Mail rule processes the wrong message
Applescript in El Capitan Mail rule processes the wrong message
- Subject: Applescript in El Capitan Mail rule processes the wrong message
- From: Christian Boyce <email@hidden>
- Date: Sun, 18 Mar 2018 17:32:56 -0700
I have a problem with a Mail rule in El Capitan. The rule has an AppleScript
step (at the end) which does a few things with the content of the incoming
message. I know the script is fine and I know also the triggering is fine. And,
this all worked great for a long time on a Mac with 10.7.5. But in El Capitan,
the AppleScript does not get the content of the received message— instead, it
gets the content of some other message. I think it's the message that was
received just before the message I want but I am not sure about that.
Here's the strange part. If a message exists in Mail, and I select it and
choose Message/Apply Inbox Rules (by hand), the message I've selected is
processed and my script knows which message to work with. But when the message
comes in and the rule is triggered automatically, the Rule gets the content of
the message before it in the message list.
If I throw away all existing messages that would match the Rule's trigger,
leaving me with a blank Inbox, and then I send myself another message that
matches the Rule's trigger, the AppleScript STILL works on the wrong message—
something that's in the trash. It's nutty.
I've read about Mail Rules in El Capitan being buggy with respect to
AppleScript but there has to be a way to make it work. My rule is definitely
trapping the right message as I can see that it's changing the message's text
color, and marking it as "read." But then the AppleScript part, which is the
last step, uses the content of a different message.
Any suggestions? I sure could use some!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden