Re: Mail Rule Triggered Script
Re: Mail Rule Triggered Script
- Subject: Re: Mail Rule Triggered Script
- From: "Michael P. Wilson" <email@hidden>
- Date: Tue, 25 Feb 2003 17:46:34 -0500
NICE!!!
I'd pretty much assumed the raw message would be obscured by an object
model.
Oh it's all over now :-p
Thanks again.
- Mike
On Tuesday, Feb 25, 2003, at 17:33 America/New_York, cricket wrote:
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.
-
"Thus nature has no love for solitude, and always leans, as it were, on
some support; and the sweetest support is found in the most intimate
friendship." - Cicero
_______________________________________________
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.