Re: selecting a message in Mail
Re: selecting a message in Mail
- Subject: Re: selecting a message in Mail
- From: Jim Brandt <email@hidden>
- Date: Fri, 18 Sep 2009 20:15:27 -0500
Axel,
OK, I'll look into the Message Viewer.
Thanks
Jim
On Sep 18, 2009, at 7:33 PM, Axel Luttgens wrote:
Hello Jim,
You're right, there's no select command in Mail's dictionary.
Let's remember that usually, a scripting model tends to allow for the
automation of tasks otherwise performed by hand.
In this case, selecting messages happen thru a message viewer.
And, indeed, the dictionary shows:
message viewerân [inh. item] : Represents the object responsible
for
managing a viewer window
elements
contains messages; contained by application.
properties
[...]
selected messages (list of message) : List of messages currently
selected
[...]
So, a message viewer has a selected messages property, and that
property seems to be a settable one.
The problem should thus be reduced to building the list of messages to
be selected.
This one works here (changing the domain of your email address, so as
to preserve the innocent):
tell application "Mail"
messages of mailbox "â¢Lists/applescript-users" whose sender
contains "email@hidden"
tell front message viewer to set selected messages to result
end tell
HTH,
Axel
_______________________________________________
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