Re: how many emails in Mail
Re: how many emails in Mail
- Subject: Re: how many emails in Mail
- From: "Mohammad F. Haque" <email@hidden>
- Date: Mon, 11 Feb 2002 23:09:12 -0500
global unread_mail
on run
set unread_mail to 0
tell application "Mail"
set total_messages to get count of every message of mailbox
"INBOX" of account "FooBar"
repeat with x from 1 to total_messages
set aMessage to message x of mailbox "INBOX" of account "FooBar"
set isRead to get is read of aMessage
if isRead is equal to 0 then
set unread_mail to unread_mail + 1
end if
end repeat
end tell
end run
unread_mail now holds the number of unread emails
works like a charm, man i'm starting to love applescript. thanks guys
for all the help.
_______________________________________________
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.