• 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: selecting a message in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: selecting a message in Mail


  • Subject: Re: selecting a message in Mail
  • From: Adam Morris <email@hidden>
  • Date: Sat, 19 Sep 2009 11:05:22 +0700

Note that Mail's dictionary indicates it wants a "list of message", which means if you want Mail to select just one message to act on, make sure you coerce it to a list.  It throws an error if you don't.

tell application "Mail"
set thisone to first message of inbox
tell front message viewer to set selected messages to thisone  -- throws error
tell front message viewer to set selected messages to {thisone}  -- works
end tell

-Adam
 _______________________________________________
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

  • Prev by Date: Re: Applescript Editor preferences
  • Next by Date: Speakable Item and SpeechRecognitionServer
  • Previous by thread: Re: selecting a message in Mail
  • Next by thread: Re: selecting a message in Mail
  • Index(es):
    • Date
    • Thread