想实现的效果是如果找不到第一张图,才会执行找第二张图后的点击命令,但一直不成功。。。
Dim found
FindPic 0,0,1920,1080,"C:\Users\01.bmp",0.9,intX,intY
If intX < 0 And intY < 0 Then
found = 1
Else
found = 0
End If
If found = 1 Then
FindPic 0,0,1920,1080,"C:\Users\02.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
SaveMousePos
MoveTo intX, intY
Delay 500
LeftClick 1
RestoreMousePos
End If
End If
Dim found
FindPic 0,0,1920,1080,"C:\Users\01.bmp",0.9,intX,intY
If intX < 0 And intY < 0 Then
found = 1
Else
found = 0
End If
If found = 1 Then
FindPic 0,0,1920,1080,"C:\Users\02.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
SaveMousePos
MoveTo intX, intY
Delay 500
LeftClick 1
RestoreMousePos
End If
End If