Re: attempting to count messages in Mail
Re: attempting to count messages in Mail
- Subject: Re: attempting to count messages in Mail
- From: David Rogers <email@hidden>
- Date: Thu, 8 Nov 2001 13:05:41 -0600
About five minutes in the Mail.app dictionary, and I came up with this,
which works to set the message count for my account:
tell application "mail.app"
set x to count messages of mailbox "INBOX" of account
"iTools:email@hidden"
end tell
Thanks a lot this didn't work 100% but got me on the right track. it
would seem that refering to the INBOX by name works if you just look at
one account but I have 4 to go through and it would only count the
messages in INBOX of account 4 i tried several things last night and
came up with this:
repeat with this_account in (every account as list)
display dialog "current account is " & account name of this_account
set current_acount to account name of this_account
try
get mailbox name of mailbox 1 of this_account (* for those
accounts that have no inbox *)
set box_name to 1
set mailcount to count messages of mailbox box_name of account
current_acount
.
.
.
now all I have to do is get it to move the messages to the deleted
messages box and I'm good to go thanks to every one for the help!
-David Rogers