0
我想創建一個應用程序,它將採用pdf作爲輸入(拖放)併發送包含用戶選擇的主題的電子郵件。將文件從第二個自動調整變量傳遞到applescript
我已經創建了一個幾乎可以工作的自動工作流程。我沒有得到的唯一部分是將丟棄的文件傳遞給applescript,以便它將它附加到郵件內
有人可以幫我解決這個問題嗎?
預先感謝您的幫助!
在這裏你可以下載壓縮工作流程 http://s000.tinyupload.com/index.php?file_id=12980776511398698508
,這裏是在Automator的工作流程結束時的AppleScript。該問題與通過輸入的第二個項目應該是包含在Automator的變量文件做
on run {input, parameters}
set theSubject to first item of input -- the subject
set myFiles to second item of input -- the file
set theContent to "" -- the content
set theAddress to "[email protected]" -- the receiver
set theAttachmentFile to myFiles
tell application "Mail"
set msg to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
tell msg to make new to recipient at end of every to recipient with properties {address:theAddress}
tell msg to make new attachment with properties {file name:theAttachmentFile as alias}
send msg
end tell
end run