我有两个问题与我的applescript。该脚本应该通过电子邮件发送一个删除的文件作为附件,并从列表中询问邮件的对象。 消息的内容必须为空。Applescript和空邮件签名/输入值列表
1)如何设置“空”电子邮件签名,因为我的邮件内容应该是空的。我收到一个错误代码“邮件中的错误不可能解决签名...”
2)我希望用户可以修改值列表{“00111111111111-number1,”0011111111111-number2“...}并添加更多的数字。什么是做到这一点的最好办法?
非常感谢提前对你的建议。
property theSubject : "subject"
property theNumber : ""
property theContent : ""
property theSignature : "none"
property onRun : ""
on run
tell application "Finder"
set sel to (get selection)
end tell
set onRun to 1
new_mail(sel)
end run
on open droppedFiles
new_mail(droppedFiles)
end open
on new_mail(theFiles)
set chosen to choose from list {"0011111111111-number1", "0011111111111-number2"} with prompt "Thanks to select"
if chosen is false then return "" -- in case of 'Cancel' return empty string
set theNumber to text 1 thru 13 of (item 1 of chosen) -- as chosen returns a list by default it must be flattened
tell application "Mail"
set newMessage to make new outgoing message with properties {visible:true, subject:theNumber}
tell newMessage
make new to recipient with properties {address:faxboxEmail}
if onRun < 1 then
make new attachment with properties {file name:theFiles as alias} at after last paragraph
end if
set the content to theContent
set message signature of newMessage to signature theSignature
end tell
activate
if onRun < 1 then
send
end if
end tell
end new_mail
谢谢。但是下次可以保存新项目吗? – wondernewbie
我只是在上面的脚本中添加行来添加在BaseList中输入的新项目(第11行,结束重复之前) – pbell