• 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
Oldest Message in Mail's Trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Oldest Message in Mail's Trash


  • Subject: Oldest Message in Mail's Trash
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 26 Jun 2008 13:53:07 -0500

If you read this short script, you will quickly decide that it should select exactly one message in mail's Trash.

tell application "Mail"
activate
if (count message viewers) = 0 then make new message viewer
set frontViewer to (some message viewer whose index is 1)
set selected mailboxes of frontViewer to {trash mailbox}
set sort column of frontViewer to date sent column
set oldestDate to (date sent of last message of trash mailbox)
set selected messages of frontViewer to (every message of trash mailbox whose date sent ≤ oldestDate) as list
end tell


But, on my Mac (Leopard 10.5.3), it selects the last 5 messages.
I've tried using 'date received' too ... same result.
In other words, 'oldestDate' isn't really the oldest date.
Is there a bug here?
Do you get the same result?

_______________________________________________
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: Oldest Message in Mail's Trash
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: PhotoShop Spot Channels
  • Next by Date: Re: Oldest Message in Mail's Trash
  • Previous by thread: Re: PhotoShop Spot Channels
  • Next by thread: Re: Oldest Message in Mail's Trash
  • Index(es):
    • Date
    • Thread