• 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: Mail, count of visible messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail, count of visible messages


  • Subject: Re: Mail, count of visible messages
  • From: Patrick Stanford <email@hidden>
  • Date: Wed, 08 Jul 2015 07:59:34 -0700

I accidentally sent this direct to Yvan instead of to the list.


On Jul 8, 2015, at 3:27 AM, Yvan KOENIG <email@hidden> wrote:

How may we get the list of visible messages

I tried also :

tell application "Mail"

set frontViewer to (some message viewer whose index is 1)
log frontViewer --> (*message viewer id 8*)
properties of frontViewer

end tell
--> error "Erreur dans Mail : Le gestionnaire AppleEvent a échoué." number -10000

and got the same error message.

The problem seems to be with Visible Messages.

This works here on 10.10.3:

tell application "Mail"
get count of messages of first message viewer
end tell

If I change it to Visible Messages then I get the -10000 error

This also works:

tell application "Mail"
get count of (messages whose read status is true) of first message viewer
end tell

I actually don’t know what the visible messages is supposed to return, but it does not seem to work in any context.  Is it supposed to give only the messages that can be seen in the message viewer or all of the messages that can be scrolled to?

If you want all of the messages that can be scrolled to then messages instead of visible messages should serve. I don’t know of any way to make a message in a viewer to be not visible.

Pat



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Mail, count of visible messages
      • From: Christopher Stone <email@hidden>
    • Re: Mail, count of visible messages
      • From: Yvan KOENIG <email@hidden>
References: 
 >Mail, count of visible messages (From: Robert Poland <email@hidden>)
 >Re: Mail, count of visible messages (From: Luther Fuller <email@hidden>)
 >Re: Mail, count of visible messages (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Mail, count of visible messages
  • Next by Date: Re: Mail, count of visible messages
  • Previous by thread: Re: Mail, count of visible messages
  • Next by thread: Re: Mail, count of visible messages
  • Index(es):
    • Date
    • Thread