Re: How to check if unread mails are waiting ?
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.