繁体   English   中英

使用邮件规则/ Applescript / Automator流在HTML按钮后面下载PDF

[英]Using a mail rule/Applescript/Automator flow to download a PDF behind an HTML button

我收到来自品牌照片激活的密件抄送电子邮件,任务是自动保存每封电子邮件中包含的照片副本。

电子邮件是HTML编码的,指向我要保存的PDF的链接附在按钮上(即“单击此处查看照片”)。

我已经成功创建了以下流程,但是它不会从HTML电子邮件中下载PDF,只有在PDF以纯文本链接时才会下载。 任何帮助将获得原始电子邮件将不胜感激...

  1. 邮件规则以对所有邮件运行AppleScript
  2. Applescript代码:

      property workFlowPath : quoted form of ("/Users/USERNAME/Documents/Applescript/WORKFLOWNAME.workflow") using terms from application "Mail" on perform mail action with messages theMessages for rule theRule repeat with eachMessage in theMessages (*Get the email Subject *) set input_Argument to content of eachMessage (*Run subroutine for workflow *) my runAutomator(input_Argument) end repeat end perform mail action with messages end using terms from (*Workflow Subroutine *) on runAutomator(input_Argument) (*Path to workflow *) (*Setup and Run the unix command *) set command to "/usr/bin/automator -i " & quoted form of input_Argument & space & workFlowPath do shell script command end runAutomator 
  3. 它触发的工作流程运行自动机流程,该流程仅将以“.pdf”结尾的文件保存到指定的文件夹中

您可以让浏览器选择下载按钮,然后激活左键单击。 唯一的问题是,您将必须指定网站的特定部分。

您可以将单词复制下来,然后转到一个名为txtformat.com的网站,将&N替换为空。 然后粘贴结果并返回到要下载的电子邮件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM