1

Я установил OS X 10.10.1 Теперь этот скрипт не работает:AppleScript, чтобы сохранить их адреса электронной почты вложения в папке не работает в Yosemite

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 скрипт работал.

Wowo [email protected]

+0

работает для меня с помощью Gmail IMAP на Yosemite – adayzdone

ответ

0

G'day из земли Оз

Ваш код, немного изменен, работает. Я думаю, что ваше использование «выбора» может быть неисправным, но не проверять его. Попробуйте «выбранный почтовый ящик».

С уважением

Brian Christmas

tell application "Mail" 
 
\t set theSelectedMessages to messages of mailbox "* items to shift" 
 
\t set this_message to item 1 of the theSelectedMessages 
 
\t tell this_message 
 
\t \t set these_attachments to every mail attachment 
 
\t \t set AttachmentNames to {} 
 
\t \t repeat with z from 1 to the count of these_attachments 
 
\t \t \t set this_attachment to item z of these_attachments 
 
\t \t \t set this_name to the name of this_attachment as rich text 
 
\t \t \t set end of AttachmentNames to this_name as rich text 
 
\t \t end repeat 
 
\t end tell 
 
end tell 
 
AttachmentNames & return & z 
 

 
--> {"2014-11-10 233839Z.zip", "2014-11-10 233839Z.zip", "(20141110233839Z 2).pdf", "2014-11-10 233839Z", " 
 
", 4}

+0

Добро пожаловать к так .. Вы можете опустить ... 'С уважением' и т.д. – Jayan

Смежные вопросы