apple scriptが動かなくなりました
以前こちらで質問させていただいて
なんとか動くようになった特定のメールが届けば転送するというスクリプですが
10.6から10.9にあげたところ動かなくなりました
property theRecipient : "xxxx@xxxxx"
property theBCCRecipient : "xxxx@xxxxx"
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with thisMessage in theMessages
try
set theJunkStatus to junk mail status of thisMessage
set theReadStatus to read status of thisMessage
if ((theJunkStatus is true) or (theReadStatus is true)) then
return
end if
set theSubject to “xxxxxxxxxx”
set theSender to sender of thisMessage
set theContent to “xxxxxxxxxxxxxxx”
set aMessage to make new outgoing message with properties {visible:false, subject:theSubject, content:theContent}
tell aMessage
make new to recipient at end of to recipients with properties {address:theRecipient}
make new bcc recipient at end of bcc recipients with properties {address:theBCCRecipient}
send
end tell
on error the error_message number the error_number
set the error_text to "Error: " & the error_number & ". " & the error_message
log (the error_text)
end try
end repeat
end tell
end perform mail action with messages
end using terms from
また、特定のメールを受けたら添付ファイルを保存というのも動きません
using terms from application "Mail"
on perform mail action with messages messageList
tell application "Mail"
repeat with eachMessage in messageList
set attachmentList to (get mail attachments of eachMessage)
repeat with eachAttachment in attachmentList
set fileName to name of eachAttachment
save eachAttachment in file (“xxx:xxx:xxxx:” & fileName)
end repeat
end repeat
end tell
end perform mail action with messages
end using terms from
どこかを直せば動くようになるかわかる方いらっしゃいますでしょうか?