メールボックス内のすべてのメールを調べ、件名に "French"という単語が含まれているものを探しますそれらの電子メールの件名をすべてテキストファイルにコピーします。ここで私は残念ながらInbox内のメールの件名をフィルタリングするApplescript
tell application "TextEdit"
make new document
end tell
tell application "Mail"
tell the mailbox "Inbox" of account "[email protected]"
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 got an error: The index of the event is too large to be valid."
を受け続けると私はすでに多くの成功なしでそれを修正しようとしている時間のカップルを費やしてきました。私のコードを見て、何が間違っているのを見てください。
おかげで多くのことを、試してみてください。私はちょうどそれをテストし、それは動作します! – user1227