Re: Mail scripting : How to select?
Re: Mail scripting : How to select?
- Subject: Re: Mail scripting : How to select?
- From: John Maisey <email@hidden>
- Date: Sun, 11 May 2008 23:34:46 +0100
set selected mailboxes of message viewers to {mailbox "Junk" of account "GĂ©rard"}
With "Junk", "Trash" or "Sent" only : no problem!
I have tried to known these names but I never succeed.
Do you want the list of account names or the mailbox names under each account?
Try this:
tell application "Mail" set myAccountNames to (name of accounts) repeat with anAccountName in myAccountNames set theMailboxNames to name of (mailboxes of account anAccountName) my displayResults(anAccountName, theMailboxNames) end repeat end tell
on displayResults(anAccountName, theMailboxNames) set myText to "Account '" & anAccountName & "' contains mailboxes:" & return repeat with thisMailboxName in theMailboxNames set myText to myText & return & " " & thisMailboxName end repeat display dialog myText end displayResults
Best wishes
John Maisey |
_______________________________________________
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