Re: Mail scripting : How to select…
Re: Mail scripting : How to select…
- Subject: Re: Mail scripting : How to select…
- From: Philip Aker <email@hidden>
- Date: Sat, 10 May 2008 23:46:36 -0700
On 08-05-09, at 08:40, awaw wrote:
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. tell application "Mail" set x to mailboxes of inbox set y to count of x display alert y set i to 1 repeat y times set z to item i of x as string display alert z set i to i + 1 end repeat end tell ==> Erreur d'AppleScript "Il est impossible de rendre «class mbxp» "INBOX" of «class mact» "Gérard" of application "Mail" en type string."
tell application "Mail" set x to mailboxes of inbox set y to count of x display alert y set i to 1 repeat y times set z to name of item i of x as string display alert z set i to i + 1 end repeat end tell ==> INBOX INBOX (y times)
But no names
Is it possible to obtain them otherwise? Just for the fun now!
Gérard,
Are you trying to get the names of these mailboxes?
tell application "Mail" set mboxen to mailboxes of every account set res to {} repeat with i from 1 to count of mboxen set end of res to item i of mboxen end repeat res end tell
|
_______________________________________________
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