• 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: Empty Apple mail trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Empty Apple mail trash


  • Subject: Re: Empty Apple mail trash
  • From: Marc Myers <email@hidden>
  • Date: Mon, 9 Jul 2007 17:54:54 -0400

On 9 Jul 2007 11:53:22,Michelle Steiner wrote:
On Jul 9, 2007, at 11:50 AM, Bob Cuilla wrote:

I havent seen anything in the "mail" dictionary that indicates that
the trash can be emptied.  Am I missing something?

tell application "Mail" delete messages of the trash mailbox end tell

That had no effect on my Mac OS X 10.3.9 running Mail 1.3.11. Apparently, it marks already deleted messages in the trash as deleted. It doesn't empty the trash.


There doesn't appear to be a scriptable means to empty the trash, except that you can set a flag on an account to automatically empty the trash on quit:

set empty trash on quit of account "myAccount" to true

or

set empty trash on quit of every account to true

I tried:

tell app "Mail"
    activate
    tell app "System Events"
        keystroke "K" using {command down}
    end
end

That didn't work, either. Even if it did, it would bring up a confirmation dialog.

Marc [07/09/2007 05:54:48 PM]

_______________________________________________
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
  • Follow-Ups:
    • Re: Empty Apple mail trash
      • From: Michelle Steiner <email@hidden>
    • Re: Empty Apple mail trash
      • From: Peter Baxter <email@hidden>
  • Prev by Date: Re: is application running
  • Next by Date: Re: Empty Apple mail trash
  • Previous by thread: Re: is application running
  • Next by thread: Re: Empty Apple mail trash
  • Index(es):
    • Date
    • Thread