• 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: Problems with lists in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with lists in Mail


  • Subject: Re: Problems with lists in Mail
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 08 Aug 2011 17:22:35 -0500

Hey Luther,

On Aug 08, 2011, at 16:48, Luther Fuller wrote:
This problem occurs in both Snow Leopard and Lion.

tell application "Mail"
set frontViewer to (some message viewer whose index is 1)
set msgList to selected messages of frontViewer

--> On Snow Leopard I thought this returned an empty list, but I can't test just now.
--> On Lion this returns a 'missing value'.

class of msgList

--> With 'missing value' it returns 'class' on my system.

end tell

With lists I usually use 'length' rather than 'count'.  Length is a property of the list and used to be faster than count.

tell application "Mail"
set frontViewer to (some message viewer whose index is 1)
set msgList to (selected messages of frontViewer) as list


--> {missing value}


length of msgList


--> 1


class of msgList


--> list
end tell

tell application "Mail"
selection
end tell

Will return the selected messages in the front message viewer, and it still returns an empty list if there is no selection.

HTH.

--
Best Regards,
Chris


 _______________________________________________
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: 
 >Problems with lists in Mail (From: Luther Fuller <email@hidden>)

  • Prev by Date: Problems with lists in Mail
  • Next by Date: Re: Deprecated ?
  • Previous by thread: Problems with lists in Mail
  • Next by thread: Re: Problems with lists in Mail
  • Index(es):
    • Date
    • Thread