Re: Get unread message count from Mail.app
Re: Get unread message count from Mail.app
- Subject: Re: Get unread message count from Mail.app
- From: Michelle Steiner <email@hidden>
- Date: Sat, 16 May 2009 13:15:59 -0700
On May 16, 2009, at 11:40 AM, Philip Aker wrote: "Get Mail's unread message count so it matches the number on its icon badge in the dock."
In 10.5, the user can choose whether the number shown on the Dock is all unread messages, just the unread ones in the inbox, or none at all.
1. Too slow
tell application "Mail" to count (every message of every mailbox whose read status is false)
This took less than one second for me:
--set a to current date tell application "Mail" tell mailboxes count of (messages whose read status is false) end tell end tell --(current date) - a
Mac OS X10.5.7, mail 3.6 (935/935.3) iMac Core 2 Duo, 2.06 GhZ (Last of the "white" modes before the silver ones). It's the only one I have, so the only one I could test.
-- Michelle
-- People aren't furniture (ok, sometimes they are but that's consensual ....) -- erin oneill
|
_______________________________________________
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