getting mail unread info
getting mail unread info
- Subject: getting mail unread info
- From: the deXtop crew <email@hidden>
- Date: Wed, 22 May 2002 00:12:52 +0200
Hi!
I want to get all unread count of my Mail account's messages. Now what I
did is I count all my messages in every mailbox of every account. Now is
it possible to only count the ones that have the Property is read set to
0?
I am a newB in AppleScript, so please help me even if the answer is
straightforward and very easy.
Thanks,
stupidFish23
PS:
here's my script
-- Application.applescript
property FolderCount : 0
property UnreadCount : 0
property MailboxCount : 0
property TotalUnreadCount : 0
on activated theObject
tell application "Mail"
set FolderCount to number of accounts
repeat FolderCount times
set MailboxCount to MailboxCount + 1
set UnreadCount to count of every message of every
mailbox of account MailboxCount
set TotalUnreadCount to TotalUnreadCount + UnreadCount
end repeat
end tell
tell window "mailwindow"
set contents of text field "foldercounter" to TotalUnreadCount
end tell
end activated
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.