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





どこかを直せば動くようになるかわかる方いらっしゃいますでしょうか?

投稿日 2014/02/28 00:46

返信
返信: 16

2014/03/08 04:45 nott への返信

度々、失礼致します。 メールアプリのplistファイルの場所を正しく理解していませんでした(すみません)。 新規ユーザーアカウントでのルールの動作についても調べてみるとよいかもしれません。 ホームディレクトリに何らかの不具合がある可能性もあるかもしれません。

→ トラブルシューティング for Mac (ソフトウェア編) (制作者に感謝致します)

このスレッドはシステム、またはAppleコミュニティチームによってロックされました。 問題解決の参考になる情報であれば、どの投稿にでも投票いただけます。またコミュニティで他の回答を検索することもできます。

apple scriptが動かなくなりました

Apple サポートコミュニティへようこそ
Apple ユーザ同士でお使いの製品について助け合うフォーラムです。Apple Account を使ってご参加ください。