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

Re: Opening a message in Mail


  • Subject: Re: Opening a message in Mail
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 22 Apr 2009 12:42:39 -0500

On Apr 22, 2009, at 11:37 AM, Christopher Stone wrote:

Hey Folks,

Why the dickens doesn't this work?

tell application "Mail"
set m to message 1 of message viewer 1
open m
end tell

This does work ...

tell application "Mail"
activate
try
set frontViewer to (message viewer 1)
on error
set frontViewer to (make new message viewer)
end try
set selected mailboxes of frontViewer to {inbox} -- necessary
set m to message 1 of frontViewer
set selected messages of frontViewer to {m} -- not necessary
open m
end tell
beep

You left out the 'necessary' line. And a message viewer may not have been open.

 _______________________________________________
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: Opening a message in Mail
      • From: Michelle Steiner <email@hidden>
References: 
 >Opening a message in Mail (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Opening a message in Mail
  • Next by Date: Re: Opening a message in Mail
  • Previous by thread: Re: Opening a message in Mail
  • Next by thread: Re: Opening a message in Mail
  • Index(es):
    • Date
    • Thread