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:21:01 -0700
On 2009-05-16, at 14:34:20, Deivy Marck Petrescu wrote: Does that script really return something for you? I've ran it many times and it never gets the right number. The only answer I get with Michelle's script is 0.
I just replied offlist to a duplicate of this post:
The problem I'm having is that I set up my mailboxes with rules so that incoming mail gets routed to an individual mailbox before it qualifies for the unread count. I hardly every get an unread in my Inbox unless it's one like the one I'm replying to. I think we'll have to arrive at some sort of composite script. Does the follow work on your setup?
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
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