• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
getting mail unread info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Prev by Date: Re: iTunes Scripting: How do I get the name of the library?
  • Next by Date: Help with retrofitting folder applescript
  • Previous by thread: getting unread info for Mail.app
  • Next by thread: Help with retrofitting folder applescript
  • Index(es):
    • Date
    • Thread