• 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: Error getting mail attachments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error getting mail attachments


  • Subject: Re: Error getting mail attachments
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 15 Dec 2016 16:50:16 -0600

On Dec 15, 2016, at 14:32, David Crowe <email@hidden> wrote:
I seem to have solved the problem. Replacing ‘selection’ by ‘selected messages of first message viewer’ seems to do the trick.


Hey David,

You can't do that effectively.  First message viewer is by order of creation – not the FRONT message viewer.

You should have mentioned that you had more than one message viewer open.  :)

This method has worked for many years now:

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

* Tested through El Capitan – I haven't installed Sierra yet.

--
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

  • Prev by Date: Re: Error getting mail attachments
  • Next by Date: Script issues under 10.12.2
  • Previous by thread: Re: Error getting mail attachments
  • Next by thread: Script issues under 10.12.2
  • Index(es):
    • Date
    • Thread