• 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: Failed attempt to select a particular mailbox in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed attempt to select a particular mailbox in Mail.app


  • Subject: Re: Failed attempt to select a particular mailbox in Mail.app
  • From: Jim Krenz <email@hidden>
  • Date: Thu, 28 May 2009 15:05:16 -0700

Thanks Luther!

I'm still absorbing the details, but looking at your example helped me figure out:

tell application "Mail"
set selected mailboxes of message viewer 1 to {mailbox "INBOX" of account "JK@org"}
end tell

Which works well.

Do you have any other scripts/suggestions that would be as educational as your example was?

Jim

On May 28, 2009, at 2:45 PM, Luther Fuller wrote:

On May 28, 2009, at 3:57 PM, Jim Krenz wrote:

In my continuing attempts to learn AppleScript, I am working on a simple script that will go to/select a particular mailbox in Mail.app. Thus far, I have been hitting my head against the wall. Here is where I am at (which returns a error - AppleEvent handler failed):

tell application "Mail"
set message viewer 1 to {mailbox "INBOX" of account "JK@org"}
end tell

I'm sure I am missing something simple, due to my lack of knowledge/experience. Is set what I want to use, or am I completely off base?

Run this and see what happens and why ...

tell application "Mail"
activate
set frontViewer to message viewer 1
set mbox to some mailbox
set selected mailboxes of frontViewer to {mbox}
end tell


 _______________________________________________
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

References: 
 >Failed attempt to select a particular mailbox in Mail.app (From: Jim Krenz <email@hidden>)
 >Re: Failed attempt to select a particular mailbox in Mail.app (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Failed attempt to select a particular mailbox in Mail.app
  • Next by Date: White Mailboxes
  • Previous by thread: Re: Failed attempt to select a particular mailbox in Mail.app
  • Next by thread: White Mailboxes
  • Index(es):
    • Date
    • Thread