你把同一级别要找的图放入一个FOR循环(或者DO循环,找到后点击完直接退出循环,执行以后的脚本,那么这层的所有找图都不会再执行了)
For 1
FindPic 0, 0, 1360, 768, "Attachment:\购买雷.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
Call 点击
Exit For
End If
FindPic 0, 0, 1360, 768, "Attachment:\购买木.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
Call 点击
Exit For
End If
FindPic 0, 0, 1360, 768, "Attachment:\购买水.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
Call 点击
Exit For
End If
FindPic 0, 0, 1360, 768, "Attachment:\购买火.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
Call 点击
Exit For
End If
next
或者你把同一级要找的图 全部用Else 来表示,如果找到图以后Else是不会成立的~~
具体操作还是要根据你需要的逻辑来编写代码!