• 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: Philip Aker <email@hidden>
  • Date: Mon, 12 May 2008 02:33:26 -0700

On 08-05-11, at 03:52, awaw wrote:

Your script completed as here after show the difficulty to obtain the names of sub-boxes.
It's not new… cf last messages.

And consequently for the names of "sub-boxes" Corbeille/sur mon Mac (Trash/??????) Courrier indésirable/sur mon Mac (Junk/??????)

Have you an indication (I have tried many "names" without success)?

I'm still having a problem understanding what you need :-(

Here's every top level mailbox:

tell application "Mail"
set namelist to {}
set res to {}
set mboxen to get every mailbox of every account
repeat with i from 1 to count of mboxen
set acct to item i of mboxen
repeat with j from 1 to count of acct
set end of res to item j of acct
end repeat
end repeat
repeat with i from 1 to count of res
set end of namelist to name of item i of res
end repeat
namelist & name of (mailboxes whose name of its container is missing value)
end tell

Here's every mailbox that has a parent (two levels only):

tell application "Mail"
set res to {}
set nlist to (name of every mailbox whose name of its container is not missing value)
repeat with m from 1 to count of nlist
set c to container of mailbox m
if exists c then
set end of res to name of c & "/" & name of mailbox m
end if
end repeat
res
end tell


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Sent from my SE/30

 _______________________________________________
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

References: 
 >Mail scripting : How to select… (From: awaw <email@hidden>)
 >Re: Mail scripting : How to select… (From: Luther Fuller <email@hidden>)
 >Re: Mail scripting : How to select… (From: awaw <email@hidden>)
 >Re: Mail scripting : How to select… (From: Axel Luttgens <email@hidden>)
 >Re1: Mail scripting : How to select… (From: awaw <email@hidden>)
 >Re: Mail scripting : How to select… (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Re1: Mail scripting : How to select…
  • Next by Date: Dumb Apple Mail scripting question.
  • Previous by thread: Re: Mail scripting : How to select…
  • Next by thread: Adding an attachment to an email
  • Index(es):
    • Date
    • Thread