2016-04-19 3 views
0

メッセージを転送して件名を編集するためにAppleScriptを書き込もうとしました。現在、私は受取人と件名の転送と移入に取り組んでいます。AppleScriptを使用して転送されたメッセージの件名を編集 - 件名を編集するときにエラーが発生しました

私はこれを実行すると、それは私にエラー与える:それは私に言っている理由、それは編集することはできません

tell application "Mail" 
    set theSelection to selection 
    set theForwardedMessage to forward (item 1 of theSelection) with opening window 
    tell theForwardedMessage 
     make new to recipient with properties {address:"[email protected]"} 
     set subject to "blahblahblah" 
    end tell 
end tell 

私が把握することはできません。ここで

"Mail got an error: Can't set subject of item to any."

コードです件名すべてのポインタ?

答えて

0

私はこれが少し助けてくれることを望みますが、私はあなたのスクリプトと質問を完全に理解していません。

set recipientName to "ZWEKKERBOY" 
set recipientAddress to "[email protected]" 
set theSubject to "Subject here" 
set theContent to "Content" 

--Mail Tell Block 
tell application "Mail" 

--Create the message 
set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true} 

    --Set a recipient 
tell theMessage 
     make new to recipient with properties {name:recipientName, address:recipientAddress} 

    --Send the Message 
    send 

end tell 
end tell 

- クレジットメーカー!

あなたは

set theSubject to subject 
-- that's "blahblahblah" 

set theSubject to "Subject here" 

ライン

を変更することができます

関連する問題