• 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
Re: How to check if unread mails are waiting ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if unread mails are waiting ?


  • Subject: Re: How to check if unread mails are waiting ?
  • From: cricket <email@hidden>
  • Date: Wed, 25 Sep 2002 09:59:44 -0700

On Wednesday, September 25, 2002, at 06:09 AM, Fridiric Bultot wrote:

Many many thanks for your quick answer on my last
question. Unfortunately, I was wrong. I don't want to
trigger the function to check if new mails arrives but
check if unread mails are pending on my mailbox ?

In case of positive answer, I wantot execute certain
code otherwise do something else.

Something like this should work:

tell application "Mail"
set unreadCount to 0
repeat with eachAccount in every account
tell eachAccount
set unreadCount to unreadCount + (unread count of mailbox "In")
end tell
end repeat
if unreadCount is equal to 0 then
display dialog "You have no unread messages!"
else
display dialog ("You have " & unreadCount as string) & " unread message(s)!"
end if
end tell

- cricket

----->
Software Entomologist/Mail for Mac OS X email@hidden
---------->
His wire-frame glasses were possibly suave.
_______________________________________________
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.

References: 
 >How to check if unread mails are waiting ? (From: "Frédéric" Bultot <email@hidden>)

  • Prev by Date: Re: String to multiple-item list coercion
  • Next by Date: Re: String to multiple-item list coercion
  • Previous by thread: How to check if unread mails are waiting ?
  • Next by thread: Re: text to speech volume
  • Index(es):
    • Date
    • Thread