On Apr 7, 2008, at 9:54 AM, awaw wrote: How can I get this "property" and use it to construct dynamically the name of the mbox and reach for example "Society/Computer/Apple" and then continue the script as under with "tell mailbox mbox"
The following script fragment will return a list of mailboxes; each item of the list will be either an empty list or a list of unread messages in a mailbox.
tell application "Mail" messages of mailboxes whose read status is false end tell
For instance, right now, I get this result:
{{}, {}, {message id 864641 of mailbox "Applescript" of application "Mail"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {message id 864640 of mailbox "Freecycle" of application "Mail", message id 864638 of mailbox "Freecycle" of application "Mail", message id 864636 of mailbox "Freecycle" of application "Mail"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {message id 864642 of mailbox "Prius 2008" of application "Mail", message id 864637 of mailbox "Prius 2008" of application "Mail"}, {message id 864643 of mailbox "Prius Tech" of application "Mail"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}}
I can't figure out how to extract the non-empty items without looping, though.
-- Michelle
-- My choice early in life was either to be a piano-player in a whorehouse or a politician. And to tell the truth, there's hardly any difference. -- Harry S. Truman (circa 1962)
|