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

Re: Mail scripting : How to select…


  • Subject: Re: Mail scripting : How to select…
  • From: awaw <email@hidden>
  • Date: Fri, 9 May 2008 16:50:38 +0200

Thanks for your posts.

The "case" inbox is solved.   Inbox uppercase!

I have tried all suggested syntaxes.

I can't select any "sub-folder" of Junk, Trash or Sent Mailboxes. Uppercase doesn't help…

tell application "Mail"
set selected mailboxes of first message viewer to {mailbox "INBOX" of account "Gérard"}
-- OK if "inbox" in uppercase!


set selected mailboxes of message viewers to {inbox}
--> OK


set selected mailboxes of first message viewer to {inbox}
--> OK


set selected mailboxes of message viewers to {junk mailbox}
--> OK


set selected mailboxes of message viewers to {trash mailbox}
--> OK


set selected mailboxes of message viewers to {sent mailbox}
--> OK


set selected mailboxes of message viewers to {mailbox "Gérard" of mailbox junk mailbox}
--> No error but NO selection

set selected mailboxes of first message viewer to {mailbox junk mailbox of account "Gérard"}
--> No error but NO selection

set selected mailboxes of first message viewer to {junk mailbox of account "Gérard"}
--> No error but NO selection


set selected mailboxes of message viewers to {mailbox "Gérard" of mailbox "junk mailbox"}
--> Erreur dans Mail : Le gestionnaire AppleEvent a échoué.


--set selected mailboxes of message viewers to {mailbox "Gérard" of mailbox "INBOX"}
--> Erreur dans Mail : Le gestionnaire AppleEvent a échoué.
end tell

Others suggestions?

Gérard

Le 9 mai 08 à 14:40, Luther Fuller a écrit :

On May 9, 2008, at 4:29 AM, awaw wrote:

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".


But this does work

set selected mailboxes of message viewers to {inbox}

and so does

set selected mailboxes of message viewers to {mailbox "x" of mailbox "y"}

but this does not work!

set selected mailboxes of message viewers to {mailbox "Alltel" of inbox}

And I don't see why not. ???


 _______________________________________________
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

  • Follow-Ups:
    • Re: Mail scripting : How to select…
      • From: Axel Luttgens <email@hidden>
References: 
 >Mail scripting : How to select… (From: awaw <email@hidden>)
 >Re: Mail scripting : How to select… (From: Luther Fuller <email@hidden>)

  • Prev by Date: Adding an attachment to an email
  • Next by Date: Re: keystroke - cancel modifiers?
  • Previous by thread: Re: Mail scripting : How to select…
  • Next by thread: Re: Mail scripting : How to select…
  • Index(es):
    • Date
    • Thread