2017-10-30 17 views
-2

Mac OSX 10.12.6で作業していて、AppleScriptをビルドして電子メールを作成し、PDFファイルとjpegファイルを添付しました。スクリプトを実行すると、pdfファイルとjpegファイルを添付しようとするとエラーが発生します。AppleScript for Mailで動作する添付ファイルを取得する

メールにエラーが発生しました:{ファイル名: "MacintoshHD:ユーザー:peteradam:PPAttachments:EmailFolder:Quote_15018_301017.pdf"、ファイルサイズ:200339}を添付ファイルのプロパティに入力できません。

ファイル名が変更されたjpegに対してエラーメッセージが繰り返されます。

また、シグネチャとアタッチメント1をエイリアスとして設定してみました。次のように

スクリプトは次のとおりです。 "名前"

セットtheAddress "[email protected]"

セットtheSubjectに "回EXPOPRINT"

セットtheContentへの

セットTheRecipient 「間違っているときは」にしないでください

送信者を「私」に設定します

「MacintoshHDにtheAttachment1を設定するためのアプリケーション "ファインダー" を伝える20530

に "回EXPOPRINT Signature.jpg:ユーザー:peteradam:PPAttachments:EmailFolder MacintoshHD"

セットtheSignatureSizeにtheSignatureを設定するために、3210

のtellアプリケーション "ファインダー" :ユーザー:peteradam:PPAttachments:EmailFolder:Quote_15018_301017.pdfメール "

set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent & return & return, visible:true} 

tell theMessage 

    set sender to theSender 

    make new to recipient at end of every to recipient with properties {name:TheRecipient, address:theAddress} 

    try 

     make new attachment with properties {file name:theAttachment1, file size:theAttachmentSize1} at after last paragraph 

     set message_Attachment to 0 

    on error errmess 

     log errmess 

     display dialog errmess 

     set message_Attachment to 1 

    end try 

    log "message_attachment =" & message_Attachment 

    make new attachment with properties {file name:theSignature, file size:theSignatureSize} at after last paragraph 

    delay 1 

end tell 

セットtheAttachmentSize1 200339

のtellアプリケーションへ"

エンドファイルサイズのプロパティを削除することによって、私は、問題を解決し

答えて

0

伝える

関連する問題