我试图使用HTML
从电子邮件中提取AppleScript
。我遇到了这个StackExchange帖子 - Mac Automator/Applescript(?) to extract URL's from Mail messages--它试图从电子邮件内容中提取URL。提取代码是:
on run {input, parameters}
set mailContentList to {}
tell application "Mail"
repeat with selectedMail in input
set end of mailContentList to content of selectedMail
end repeat
end tell
return mailContentList
end run
这只提取visible
内容,而不是整个HTML
内容。我尝试在with properties {visible:false}
之后添加content
然后在input
之后添加没有运气。
你得到了source
属性的原始来源
set end of mailContentList to source of selectedMail
但你必须“手动”提取HTML部分。