私は AHK フォーラムからこのコードのスニペットを入手しました。成功するにはコードが 1 行欠けているだけで済むことを願っています。ユーザーに INPUTBOX の文字列を入力してもらいたい。次に、特定のメールボックス内のすべての電子メール (「Deliveries」など) をループし、その文字列を含む txt が見つかったら、ループ内の次のメッセージに進む前に特定のアクションを実行します。
ヘルプ?
Loop, 10 {
; Loop through all the MailItems in the Inbox Folder
MailItems := Folders.item("Deliveries").Items
Loop, % MailItems.Count {
Item := MailItems.item(A_Index)
{
; Add code to copy txt of each msg into a var
; Check if that var CONTAINS the specified string and act accordingly
msgtxt: = Item.Body ????
}