Re: How to select a message in Apple mail, given mail ID?
Re: How to select a message in Apple mail, given mail ID?
- Subject: Re: How to select a message in Apple mail, given mail ID?
- From: Shuba and Karthik <email@hidden>
- Date: Wed, 28 Sep 2011 22:37:14 -0700
On Sep 26, 2011, at 9:50 AM, Shuba and Karthik wrote:
How do I *select* a message in the message viewer of Apple Mail given the message ID?
In case it makes a difference to your response, I am on Mac OS X 10.6.8.
Thank you all for your responses. I settled on using the foll. script:
try
tell application "Mail"
activate
if (count message viewers) is 0 then make message viewer
set selected mailboxes of front message viewer to {mailbox "Forward" of account "My account"}
tell the front message viewer
set unreadMsgs to every message whose read status is false
set properties to {visible messages:unreadMsgs}
repeat with theMsg in unreadMsgs
set theID to id of theMsg
set selected messages to {first message whose id is theID}
-- Process unread and selected message
end repeat
end tell
end tell
on error
display dialog "Error encountered or there aren't any unread messages." default button 1
end try
Thanks,
Shuba
_______________________________________________
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