• 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:45:17 +0200


Le 08/07/2015 à 18:33, Christopher Stone <email@hidden> a écrit :

On Jul 08, 2015, at 11:03, Yvan KOENIG <email@hidden> wrote:
I repeat what I get with 10.10.4
______________________________________________________________________

Hey Yvan,

That's a bummer.

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

Properties hasn't worked for Mail-Viewer-Windows for a long time (if at all).

On the other hand addressing individual properties works on 10.9.5:

--------------------------------------------------------------------------
tell application "Mail"
  set frontMsgVwr to (some message viewer whose index is 1)
  
  tell frontMsgVwr
    
    set vCol to visible columns
    set oBox to outbox
    set pView to preview pane is visible
    set selMbox to selected mailboxes -- Errors if Smart Mailbox is selected
    
  end tell
  
end tell
--------------------------------------------------------------------------

--
Best Regards,
Chris


Thanks.

 Some properties are correctly returned but Robert asked for the list of visible messages and it fails :
tell application "Mail"
set frontMsgVwr to (some message viewer whose index is 1)
log frontMsgVwr --> (*message viewer id 34*)
tell frontMsgVwr


set vCol to visible columns
log result --> (*message status column, flags column, attachments column, from column, subject column, to column, date received column, mailbox column*)
set oBox to outbox
log result --> (*outbox*) ???
set pView to preview pane is visible
log result --> (*false*)
set selMbox to selected mailboxes -- Errors if Smart Mailbox is selected
log result --> (*mailbox INBOX of account iCloud*)
set visibleMessages to visible messages
--> error "Erreur dans Mail : Le gestionnaire AppleEvent a échoué." number -10000
end tell


end tell

So, given the fact that asking for this property fails it's logical that asking for the entire set fails too.
Maybe grabbing visible messages fail for years. I never used this piece of code before reading Robert's question.


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





 _______________________________________________
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: Luther Fuller <email@hidden>)
 >Re: Mail, count of visible messages (From: Yvan KOENIG <email@hidden>)
 >Re: Mail, count of visible messages (From: Patrick Stanford <email@hidden>)
 >Re: Mail, count of visible messages (From: Christopher Stone <email@hidden>)
 >Re: Mail, count of visible messages (From: Yvan KOENIG <email@hidden>)
 >Re: Mail, count of visible messages (From: Christopher Stone <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: Cannot re-create mailboxes
  • Index(es):
    • Date
    • Thread