• 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: Yvan KOENIG <email@hidden>
  • Date: Wed, 08 Jul 2015 18:53:50 +0200


Le 08/07/2015 à 17:52, Robert Poland <email@hidden> a écrit :


On Jul 8, 2015, at 8:10:AM, Christopher Stone <email@hidden> wrote:

On Jul 07, 2015, at 16:19, Robert Poland <email@hidden> wrote:

Guess no one else has any ideas either…
______________________________________________________________________

Hey Bob,

Why don't you explain what you're actually trying to do.

--
Best Regards,
Chris

I think the script sould be enough of an explanation. 😀

Here is my attempt which errors, "access not allowed”;

tell application "Mail"
delay 0.2
set x to (count of visible messages in  “Inbox" of account 1)
say x
delay 0.2
set y to x is less than 18
delay 0.2
end tell
return y

Robert Poland
Fort Collins, CO


Hello Robert

It seems that you missed that you were given pieces of explanation in a message signed :
Yvan KOENIG (VALLAURIS, France) mardi 7 juillet 2015 18:56:06

You are asking for visible messages in a mailbox.

I repeat that your instruction doesn't compile under 10.10.4
It must be edited as :

set x to (count of visible messages in  mailbox “Inbox" of account 1)

With this change, it compiles but it fails logically.

visible message is not a property of a mailbox but one of a message viewer !

Mail dictionary is perfectly clear :

message viewer n : Represents the object responsible for managing a viewer window
elements
contains messages; contained by application.
properties
drafts mailbox (mailbox, r/o) : The top level Drafts mailbox
inbox (mailbox, r/o) : The top level In mailbox
junk mailbox (mailbox, r/o) : The top level Junk mailbox
outbox (mailbox, r/o) : The top level Out mailbox
sent mailbox (mailbox, r/o) : The top level Sent mailbox
trash mailbox (mailbox, r/o) : The top level Trash mailbox
sort column (attachments column/‌message color/‌date received column/‌date sent column/‌flags column/‌from column/‌mailbox column/‌message status column/‌number column/‌size column/‌subject column/‌to column/‌date last saved column) : The column that is currently sorted in the viewer
sorted ascending (boolean) : Whether the viewer is sorted ascending or not
mailbox list visible (boolean) : Controls whether the list of mailboxes is visible or not
preview pane is visible (boolean) : Controls whether the preview pane of the message viewer window is visible or not
visible columns (list of attachments column/‌message color/‌date received column/‌date sent column/‌flags column/‌from column/‌mailbox column/‌message status column/‌number column/‌size column/‌subject column/‌to column/‌date last saved column) : List of columns that are visible. The subject column and the message status column will always be visible
id (integer, r/o) : The unique identifier of the message viewer
visible messages (list of message) : List of messages currently being displayed in the viewer
selected messages (list of message) : List of messages currently selected
selected mailboxes (list of mailbox) : List of mailboxes currently selected in the list of mailboxes
window (window) : The window for the message viewer


Yvan KOENIG running Yosemite 10.10.4 (VALLAURIS, France) mercredi 8 juillet 2015 18:52:19




 _______________________________________________
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

References: 
 >Mail, count of visible messages (From: Robert Poland <email@hidden>)
 >Re: Mail, count of visible messages (From: Yvan KOENIG <email@hidden>)
 >Re: Mail, count of visible messages (From: Robert Poland <email@hidden>)
 >Re: Mail, count of visible messages (From: Christopher Stone <email@hidden>)
 >Re: Mail, count of visible messages (From: Robert Poland <email@hidden>)

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