• 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: [mac os x] count of messages from mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mac os x] count of messages from mail


  • Subject: Re: [mac os x] count of messages from mail
  • From: Paul Berkowitz <email@hidden>
  • Date: Sat, 09 Jun 2001 08:32:07 -0700

On 6/9/01 1:43 AM, "Jacco Rens" <email@hidden> wrote:

> hi all,
>
> tell application "Mail"
> set x to the count of the messages of mailbox "AppleScript Users"
> end tell
> display dialog x
>
> gives me;
> Mail got an error:
> NSReceiverEvaluationScriptError: 3
>
> does this mean that Mail's scripting is still in beta form, or did i do
> something wrong?
>
Both, It seems.

If you look at the 'application' entry for Mail, you'll see that there is no
element 'mailbox' listed there. But if you look under 'account', or any of
the various individual account types such as 'local account', you'll find
'mailbox' there. Playing around with 'account name of account 1', etc., it
turns out that your main 'Personal Mailboxes', including your main INBOX
actually belong to your local account "Personal Mailboxes". (Although the
'mailbox name of mailbox 1 of account 1' is recorded as "INBOX.mbox", and
'name of mailbox 1 of account 1' errors and 'mailbox "INBOX.mbox" of
account 1' errors,

mailbox "INBOX" of account "Personal Mailboxes"

or

mailbox "Inbox" of account 1

are both fine, and same for other mailboxes. So, depending on your setup

set x to the count of the messages of mailbox "AppleScript Users" of
account "Personal Mailboxes"

or of the actual POP or IMAP account you're using, such as


set x to the count of the messages of mailbox "AppleScript Users" of
account "mac.com"

will both run fine , without error. Unfortuinately, the result they give,
for every mailbox I have, is

--> 0

That's it: 0. I think that one counts as a "still in beta form", otherwise
known as "bug".

--
Paul Berkowitz


References: 
 >[mac os x] count of messages from mail (From: Jacco Rens <email@hidden>)

  • Prev by Date: Re: Finder Application Menu
  • Next by Date: Re: Scripting in OSX: Classic osaxen for Classic apps?
  • Previous by thread: [mac os x] count of messages from mail
  • Next by thread: Scripting in OSX: Classic osaxen for Classic apps?
  • Index(es):
    • Date
    • Thread