【发布时间】:2011-11-17 06:39:47
【问题描述】:
我正在尝试编写一个脚本来完成以下工作:它遍历邮箱中的所有电子邮件,找到主题行中包含“French”一词的邮件,然后复制这些邮件的所有主题行文本文件中的电子邮件。这是我想出的
tell application "TextEdit"
make new document
end tell
tell application "Mail"
tell the mailbox "Inbox" of account "tigeresque@gmail.com"
set numm to count of messages
repeat with kk from 1 to numm
set wordsub to subject of the message kk
tell application "TextEdit"
if "French" is in wordsub then
set paragraph kk of front document to wordsub & return
end if
end tell
end repeat
end tell
end tell
很遗憾,我一直收到错误消息
“TextEdit 出错:事件的索引太大而无效。”
我已经花了几个小时试图修复它,但没有取得多大成功。你能看看我的代码,看看有什么问题吗?
【问题讨论】:
标签: applescript