Re: problem with a mail.app script
Re: problem with a mail.app script
- Subject: Re: problem with a mail.app script
- From: BJ Terry <email@hidden>
- Date: Mon, 12 Apr 2004 16:48:21 -0700
On Apr 12, 2004, at 4:19 PM, Kim Holburn wrote:
Thanks.
I'm having a bit of trouble understanding the third line of your
fragment. Is this what you meant?
tell application "Mail"
set messageViewers to every message viewer where it's visible is true
set selectedMailboxes to selected mailboxes of messageViewers
^^^^^^^^^^^^^^
Also why are do you need 2 nested repeats? Is selectedMailboxes a
list of lists?
Yes, selectedMailboxes is a list of lists. Each message viewer returns
a list of selected mailboxes, since you can have multiple selected. And
the every clause always returns a list of message viewers.
Also is "name of mailbox x" enough to uniquely identify a mailbox?
No, it actually isn't. To specify a mailbox uniquely, you actually need
to give its full path, like "Mailing Lists/AppleScript-users".
Unfortunately, there isn't anything in the dictionary that uniquely
identifies it really easily. You can check the name first, then check
the container, to see if it's the same, until eventually you reach an
account container instead of a mailbox. If you have mailboxes with
identical names, that's probably the only option.
BJ
_______________________________________________
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.