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: Philip Aker <email@hidden>
- Date: Sat, 16 May 2009 15:30:35 -0700
On 2009-05-16, at 15:21:01, Philip Aker wrote:
set sum to 0 tell application "Mail" set res to {} set res to unread count of every mailbox repeat with i in res set sum to sum + i end repeat if (sum is 0) then set alist to every account whose enabled is true repeat with af in alist set res to unread count of mailbox "INBOX" of af end repeat end if sum end tell
= WRONG
I think it's better stated as:
tell application "Mail" set sum to 0 set res to {} set res to unread count of every mailbox repeat with i in res set sum to sum + i end repeat set alist to every account whose enabled is true repeat with af in alist set sum to sum + (unread count of mailbox "INBOX" of af) end repeat return sum end tell
Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch.
|
_______________________________________________
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