Operating system 将电子邮件附件保存在文件夹中的applescript在约塞米蒂不起作用

Operating system 将电子邮件附件保存在文件夹中的applescript在约塞米蒂不起作用,operating-system,applescript,email-attachments,osx-yosemite,Operating System,Applescript,Email Attachments,Osx Yosemite,我已经安装了OS x 10.10.1 现在此脚本不起作用: tell application "Mail" set theSelectedMessages to selection set this_message to item 1 of the theSelectedMessages tell this_message set these_attachments to every mail attachment

我已经安装了OS x 10.10.1 现在此脚本不起作用:

tell application "Mail"
  set theSelectedMessages to selection
  set  this_message to item 1 of the theSelectedMessages
        tell this_message
           set these_attachments to every mail attachment
                repeat with z from 1 to the count of these_attachments
                set this_attachment to item z of these_attachments
                set this_name to the name of this_attachment as text
……等等

我得到的信息是:苹果事件例程出错。错误出现在这一行:将这些附件设置为每个邮件附件

在10.9中,脚本起了作用

沃沃
woide@wwp-service.de

G'day从Oz之地出发

您的代码稍加修改就可以工作。我认为您对“选择”的使用可能有缺陷,但尚未对其进行测试。请尝试“选定邮箱”

问候

布莱恩圣诞节

告诉申请者邮件 将SelectedMessages设置为要移位的邮箱*项目的邮件 将此消息设置为所选消息的第1项 告诉我这个消息 将这些附件设置为每个邮件附件 将AttachmentNames设置为{} 用z从1重复到这些_附件的计数 将此_附件设置为这些_附件的项目z 将此\u名称设置为此\u附件的富文本名称 将此_名称的AttachmentNames结尾设置为富文本 结束重复 结束语 结束语 附件名称和返回(&z) ->{2014-11-10 233839Z.zip,2014-11-10 233839Z.zip,20141110233839Z 2.pdf,2014-11-10 233839Z,
,4}适用于我在YosemiteWelcome上使用gmail imap,以便。。你可以省略…“问候”等