Re: Mail scripting : How to select…
Re: Mail scripting : How to select…
- Subject: Re: Mail scripting : How to select…
- From: Axel Luttgens <email@hidden>
- Date: Fri, 9 May 2008 14:23:03 +0200
Le 9 mai 08 à 11:29, awaw a écrit :
In Applescript I know ( now ;-) ) how to select a mailbox with :
set selected mailboxes of message viewers to {mailbox The_Box}
But this doesn't run with "inbox", "sent mailbox", "junk mailbox"
and "trash mailbox".
Hello Gérard,
inbox, sent mailbox and so on are properties; so, just use them
directly, as in:
tell application "Mail"
set selected mailboxes of first message viewer to {inbox}
end tell
Inbox has accounts for sub-folders
Sent mailbox has the same sub-folders than inbox
Junk Mailbox has a "Junk" sub-folder and after the same sub-folders
than inbox
Trash Mailbox has a "Deleted Message" sub-folder and after the same
sub-folders than inbox
I can built the "path" (Junk/Gérard for example) but I can't select
it.
Going further with inbox:
tell application "Mail"
set selected mailboxes of first message viewer to {mailbox "INBOX"
of account "Gérard"}
end tell
I got the syntax by asking for "mailboxes of inbox"; I guess it has
been made that way so as to avoid name clashes with user-defined
mailboxes (as well as to comply with the IMAP model, but that's
another point).
HTH,
Axel _______________________________________________
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