• 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: Scripting mail attachments in Yosemite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting mail attachments in Yosemite


  • Subject: Re: Scripting mail attachments in Yosemite
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 20 Oct 2014 16:33:04 +0200

This code work here under Yosemite :

tell application "Mail"
tell message viewer 1 # ADDED
set selectedMessages to the selected messages
try
repeat with theMessage in selectedMessages
repeat with theAttachment in theMessage's mail attachments
get properties of theAttachment # ADDED
end repeat
end repeat
end try
end tell # ADDED
end tell


Here, the events log was:

tell application "Mail"
get selected messages of message viewer 1
--> {message id 134419 of mailbox "INBOX" of account "abcd", message id 134431 of mailbox "INBOX" of account "abcd"}
count every mail attachment of message id 134419 of mailbox "INBOX" of account "abcd"
--> 1
get properties of item 1 of every mail attachment of message id 134419 of mailbox "INBOX" of account "abcd"
--> {downloaded:true, MIME type:"image/png", name:"2014-10-17T19.08.01.png", file size:48268, class:mail attachment, id:"2"}
count every mail attachment of message id 134431 of mailbox "INBOX" of account "abcd"
--> 0
end tell

Yvan KOENIG (VALLAURIS, France) lundi 20 octobre 2014 16:32:59


Le 20/10/2014 à 15:27, Tiago Mendo <email@hidden> a écrit :

The following line also does not work in Yosemite

  1. repeat with theAttachment in theMessage's mail 

It simply does not return any attachment so it won't enter the cycle. Has anybody opened a bug report to apple yet?




 _______________________________________________
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: Scripting mail attachments in Yosemite
      • From: Todd Vasquez <email@hidden>
References: 
 >Re: Scripting mail attachments in Yosemite (From: Tiago Mendo <email@hidden>)
 >Re: Scripting mail attachments in Yosemite (From: 2551 <email@hidden>)
 >Re: Scripting mail attachments in Yosemite (From: Tiago Mendo <email@hidden>)

  • Prev by Date: Re: Scripting mail attachments in Yosemite
  • Next by Date: Re: Scripting mail attachments in Yosemite
  • Previous by thread: Re: Scripting mail attachments in Yosemite
  • Next by thread: Re: Scripting mail attachments in Yosemite
  • Index(es):
    • Date
    • Thread