Re: Deleting messages in Trash - On My Mac
Re: Deleting messages in Trash - On My Mac
- Subject: Re: Deleting messages in Trash - On My Mac
- From: Axel Luttgens <email@hidden>
- Date: Fri, 16 Mar 2012 14:25:22 +0100
Le 15 mars 2012 à 19:37, email@hidden a écrit :
> [...]
>
> Still nothing. I also tried adding parentheses indifferent combinations, e.g., if (account of mbox is missing value) then, and also wrapping the if section in a try statement, but nothing helps.
>
> When I use a try statement, Script Editor gives me a list of every mailbox of trash mailbox and it shows that "Deleted Messages" doesn't have an account name, but it won't delete the trash. Very strange.
OK, I remember now. But I needed to put my hands on a 10.6 box...
tell application "Mail"
repeat with mbox in mailboxes of trash mailbox
-- Before 10.7, Mail needs some help to access a mailbox' properties...
if account of (get properties of mbox) is missing value then
delete messages of mbox
end if
end repeat
end tell
Axel
_______________________________________________
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