Я пытаюсь написать AppleScript, который отправляет по электронной почте все файлы указанной папки. Он работает, как и ожидалось, когда есть только один файл, но не работает, когда их больше одного. Это просто дает мне эту ошибку:
"Mail got an error: Can’t make {alias \"Macintosh HD:Users:me:temp_photos:IMG_2902.JPG\", alias \"Macintosh HD:Users:me:temp_photos:IMG_2903.JPG\"} into type file." number -1700 from {alias "Macintosh HD:Users:me:temp_photos:IMG_2902.JPG", alias "Macintosh HD:Users:me:temp_photos:IMG_2903.JPG"} to file
Вот мой AppleScript
tell application "Finder"
set attchList to (every item of TempPhotos) as alias list
end tell
set theSender to "Me<me@me.me>"
set recipName to "You"
set recipAddress to "you@you.com"
tell application "Mail"
set newmessage to make new outgoing message with properties {subject:"Important File Attachment", content:msgText & return & return, visible:false}
tell newmessage
set visible to false
set sender to theSender
make new to recipient with properties {name:recipName, address:recipAddress}
make new attachment with properties {file name:attchList} at after the last paragraph
end tell
send newmessage
end tell
Любая помощь, пожалуйста?