在Lion中从applescript保存邮件附件

在Lion中从applescript保存邮件附件,applescript,osx-lion,Applescript,Osx Lion,似乎,使用applescript保存邮件附件的方法在Lion下被破坏了。假设'theAttachment'已经是包含附加jpg的正确对象,下面是我所做的: set strPath to (path to pictures folder) as string save theAttachment in strPath -- leads to the error: "„Mail“ got an error: error in AppleEvent-Routine." number -10000

似乎,使用applescript保存邮件附件的方法在Lion下被破坏了。假设'theAttachment'已经是包含附加jpg的正确对象,下面是我所做的:

set strPath to (path to pictures folder) as string
save theAttachment in strPath -- leads to the error: "„Mail“ got an error: error in  AppleEvent-Routine." number -10000

save theAttachment in strPath as "test" -- leads to \"test\" can't convert into typ constant" number -1700 from "test" to constant

set fileName to strFileName as alias
save theAttachment in strPath as fileName -- error "The file „Foto-121121.jpg“ wasn't found." number -43 from "Foto-121121.jpg"
而且也不可能通过触摸创建文件:

set thefullpath to POSIX path of strPath & fileName
do shell script "touch \"" & thefullpath & "\"" -- error "The file „Foto-121121.jpg“ wasn't found." number -43 from "Foto-121121.jpg"
谷歌发现的一些消息来源称,上述方法在雪豹身上效果良好,但在狮子身上效果不佳。有什么解决办法吗


备注:我在这里翻译了德语中的错误信息,但错误编号仍然相同。

Automator如何?
从邮件中获取附件
操作将起作用。

Automator如何?
从邮件中获取附件
操作将起作用