2011-10-11 3 views
1

Lion에서 applescript로 메일 첨부 파일을 저장하는 방법이 잘못되었습니다. 'theattachment'는 이미 예를 들어 JPG를 부착, 여기에 내가 무슨 짓을했는지 있습니다 :메일 첨부 파일을 Lion의 applescript에서 저장

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" 

여러 소스 말했다 스노우 레오파드 (Snow Leopard)는 잘하고 있지만 라이온은 그렇지 않습니다. 해결 방법이 있습니까?

비고 : 여기서 독일어의 오류 메시지를 번역했지만 오류 번호는 여전히 동일합니다.

답변

1

Automator는 어떻습니까? Get Attachments from Mail Messages 조치가 적용됩니다.

관련 문제