Re: Mail Rule Triggered Script
Re: Mail Rule Triggered Script
- Subject: Re: Mail Rule Triggered Script
- From: cricket <email@hidden>
- Date: Tue, 25 Feb 2003 14:33:49 -0800
On Tuesday, February 25, 2003, at 14:24PM, Michael P. Wilson wrote:
cricket,
I found your post in the archives just in time. (I think you answered
this question a couple weeks ago. But I had trouble getting in to the
list archives.)
Where can I find a bit more information on that |Somethingorother|
syntax? This is the first time I'm seeing that.
The conversion of a Cocoa dictionary to an Applescript record picks
these vertical bars up along the way, presumably to avoid namespace
conflict. The two keys, |Rule| and |SelectedMessages| are the only keys
that are available for rule execution.
As an afterthought: Is it possible within this context to nab the
whole plaintext mbox format of the message in this context, headers
and all? I'd like to use this as a trigger to inject arbitrarily
complex levels of processing into the rule system and that would help
immeasurably.
Yup! You would do something like this:
on perform_mail_action(theRecord)
tell app "Mail"
set theMessages to |SelectedMessages| of theRecord
set theMessage to item 1 of theMessages
set theSource to source of theMessage
end tell
end
The way rule execution works is that your handler will be called once
per message that matches. In future releases of Mail, you could write a
script to put in the Scripts menu and use the |SelectedMessages| key to
access all the selected messages.
Thanks very much, this cracks a major impass in an application of mine.
Hope that helps,
- cricket
----->
Software Entomologist Mail for Mac OS X
http://www.apple.com/macosx/jaguar/mail.html
---------->
Those who would deny liberty to others do not deserve it themselves.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.