我正在使用Mail applescript模板(文件>新建模板>郵件>郵件規則Action.scptd)編寫腳本,但它看起來不像模板中的示例正在工作使用蘋果腳本獲取郵件主題
using terms from application "Mail"
on perform mail action with messages these_messages for rule this_rule
tell application "Mail"
set the message_count to the count of these_messages
repeat with i from 1 to the message_count
set this_message to item i of these_messages
try
set this_subject to (subject of this_message) as Unicode text
if this_subject is "" then error
on error
set this_subject to "NO SUBJECT"
end try
say this_subject
end repeat
end tell
end perform mail action with messages
end using terms from
即使郵件有主題,它也會顯示「無主題」。我使用OS X 10.7.2和Mail 5.1。有什麼建議麼?
看到[這個問題](http://stackoverflow.com/questions/7722381/save-mail-attachment-from-applescript-in-lion)...那裏顯然是在10.7的郵件的Applescript功能的問題。 – eykanal