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
|