Oldest Message in Mail's Trash
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