Re: scripting mail to select mailboxes
Re: scripting mail to select mailboxes
- Subject: Re: scripting mail to select mailboxes
- From: "David P. Baker" <email@hidden>
- Date: Wed, 12 Mar 2003 22:50:44 -0500
Sorry, I don't understand. I'm not inside a "tell message viewer"
block. I'm inside a "tell application 'Mail'" block. Here's a test
script, showing output. How should I be doing this? Note that this
works IF the new mailbox is a "standard" mailbox (in, out, drafts,
sent, or trash).
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"}
On Wednesday, March 12, 2003, at 05:18 PM, cricket wrote:
>
>
On Wednesday, March 12, 2003, at 1:20 PM, David P. Baker wrote:
>
>
> set selected mailboxes of message viewer 1 to {trash mailbox, in
>
> mailbox}
>
> get selected mailboxes of message viewer 1
>
> -- {in mailbox, trash mailbox}
>
>
>
> set selected mailboxes of message viewer 1 to {drafts mailbox, sent
>
> mailbox, mailbox "Stuff" of account "email@hidden"}
>
> get selected mailboxes of message viewer 1
>
> -- {in mailbox, trash mailbox}
>
>
The mailbox class is part of the account class, so it won't work if
>
nested in a 'tell message viewer' block. So, try this:
>
>
set theMailbox to mailbox "Stuff" of account "email@hidden"
>
tell message viewer 1
>
set selected mailboxes to {drafts mailbox, sent mailbox, }
>
get selected mailboxes
>
end tell
>
>
Applescript is strict about containment hierarchy.
>
>
- cricket
>
>
----->
>
Software Entomologist Mail for Mac OS X
>
http://www.apple.com/macosx/jaguar/mail.html
>
---------->
>
See? We even have to whisper. It's a whole new world.
_______________________________________________
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.