• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to select a message in Apple mail, given mail ID?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to select a message in Apple mail, given mail ID?
      • From: Luther Fuller <email@hidden>
    • Re: How to select a message in Apple mail, given mail ID?
      • From: Christopher Stone <email@hidden>
References: 
 >How to select a message in Apple mail, given mail ID? (From: Shuba and Karthik <email@hidden>)
 >Re: How to select a message in Apple mail, given mail ID? (From: Ron Hunsinger <email@hidden>)

  • Prev by Date: AppleScript and SOAP
  • Next by Date: Re: How to select a message in Apple mail, given mail ID?
  • Previous by thread: Re: How to select a message in Apple mail, given mail ID?
  • Next by thread: Re: How to select a message in Apple mail, given mail ID?
  • Index(es):
    • Date
    • Thread