【问题标题】:Copy content of email body with particular subject into numbers app将具有特定主题的电子邮件正文内容复制到数字应用程序中
【发布时间】:2019-03-05 21:18:02
【问题描述】:

我正在尝试从特定帐户(因为我有四个)获取具有特定主题的所有电子邮件,然后获取这些邮件的内容并使用 AppleScript 将它们写入数字应用程序。

邮件正文包含个人信息,例如电子邮件、出生日期等,我试图将这些信息组织成列。 每封新电子邮件都在自己的行中。

如果您知道包含 Javascript 或 Automator 的解决方案,我愿意接受。

这是我现在拥有的:

tell application "Numbers"
    set LinkRemoval to make new document
    set theSheet to active sheet of LinkRemoval
    set value of cell "D1" of table 1 of theSheet to "E-mail"
    set value of cell "C1" of table 1 of theSheet to "Year Of Birth"
    set value of cell "B1" of table 1 of theSheet to "Name"
    set value of cell "A1" of table 1 of theSheet to "Phone Number"
end tell

tell application "Mail"
    set theRow to 2
    set theAccount to "MyAccount"
    get account theAccount
    set theMessages to {messages of inbox whose read status is false and subject contains "Application 2019"}
    set theContent to content of theMessages
end tell

on SetMessage(theMessage, theRow, theSheet)
    tell application "Numbers"
        set theRange to "D" & theRow
        set formula of range theRange of theSheet to theContent
    end tell
end SetMessage

不幸的是,我得到了错误:

错误“无法获取应用程序 \"Mail\" 的帐户 ID \"22ED50FB-BF71-4D0A-A96B-9A78E4F57C8\" 的邮箱 \"INBOX\" 的 {{message id 33410 的内容/em>

有没有人可以解决这个问题?我做错了什么?

【问题讨论】:

    标签: automation applescript applescript-numbers


    【解决方案1】:

    尝试更改访问这一行的内容:

    set theContent to {the content of every message of inbox whose read status is false and subject contains "Application 2019"}
    

    这应该会为您提供找到的每条消息的正文列表。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-05
      • 1970-01-01
      • 2018-01-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多