• 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: scripting mail to select mailboxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting mail to select mailboxes


  • Subject: Re: scripting mail to select mailboxes
  • From: cricket <email@hidden>
  • Date: Thu, 13 Mar 2003 11:59:30 -0800

On Thursday, March 13, 2003, at 11:25 AM, David P. Baker wrote:

OK, but please take a look at the code I sent you in my last email. It doesn't appear to have that problem. I'll copy it here for convenience. Please tell me what is wrong with it. Note that I don't get an error (as I perhaps would if it were a containment hierarchy problem); it just fails silently.

tell application "Mail" to get selected mailboxes of message viewer 1
-- {mailbox "Loft" of account "email@hidden" of application "Mail"}

tell application "Mail"
set theBox to mailbox "Stuff" of account "email@hidden"
set selBoxes to {theBox}
set selected mailboxes of message viewer 1 to selBoxes
get selected mailboxes of message viewer 1
end tell
-- {mailbox "Loft" of account "email@hidden" of application "Mail"}

Also, the Mail dictionary has drafts mailbox and sent mailbox as part of the application class, not the message viewer class as you describe.

My apologies. Since 10.2, we have moved these to the message viewer class, to enable the ability to target them on a per message viewer basis (Ex-Eudora users asked for this).

So I'm still confused. Can you try to replicate my problem? Thanks.

I can't replicate it on 10.2.4 or on our own internal builds. Seems to work fine for me. What do you get from the output of 'get every mailbox of account "email@hidden"'. My suspicion would be that 'theBox' is ending up with a empty value or that you have more than one message viewer (get count of every message viewer would help debug that) open.

- cricket

----->
Software Entomologist  Mail for Mac OS X
http://www.apple.com/macosx/jaguar/mail.html
---------->
A carnivorous plant will come to visit you in the night.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: scripting mail to select mailboxes (From: "David P. Baker" <email@hidden>)

  • Prev by Date: Re: scripting mail to select mailboxes
  • Next by Date: Re: Running a script from Mail.app
  • Previous by thread: Re: scripting mail to select mailboxes
  • Next by thread: Re: scripting mail to select mailboxes
  • Index(es):
    • Date
    • Thread