for循环控制之后的Google Apps Script Missing)。 (第4行,文件"代码")解散

时间:2014-05-17 14:36:46

标签: google-apps-script

运行此脚本后

    function followUpUnreplied() {
  // Every thread in your Inbox that is read, older than two days, and not labeled "delete me".
  var threads = GmailApp.search('label:leads---dealt-with older_than:1d newer_than:2d -{label:Conversion}');
  for (var i = 0; i < threads.length; i++) {
    if (threads[i].getMessageCount() < 2) {
    // looks like an unreplied-to message
      threads[i].addLabel(GmailApp.getUserLabelByName("Follow Up"))
    }
  }
}

我收到错误消息

Missing ) after for-loop control. (line 4, file "Code")Dismiss

我不是程序员 - 只是代码猴子的东西。有人帮我解决这个问题吗?任何帮助非常感谢:)

1 个答案:

答案 0 :(得分:0)

尝试将&lt;替换为<,请注意有两个出现 - 一个出现在for声明中,另一个出现在内部if声明中。