按键精灵找图,找不到图一找图二,我这个图二怎么只开始找一次点击,以后图二出现不点击了

Rem ks

FindPic 0,0,1024,768,"Attachment:\神盾.bmp",0.9,intX,intY

If intX > 0 And intY > 0 Then

ax=intx

ay=inty

t1=now

else

FindPic 0,0,1024,768,"Attachment:\图二.bmp",0.9,intX,intY

If intX > 0 And intY > 0 Then

moveto intx,inty

leftclick 1

end if

End If

t2=now

Do

If datediff("s", t2, now) > 6000 Then

MoveTo ax, ay

LeftClick 1

Goto ks

End If

FindPic 0,0,1024,768,"Attachment:\神盾.bmp",0.9,intX,intY

If intX > 0 And intY > 0 Then

t2=now

MoveTo intx, inty

LeftClick 1

If datediff("s", t1, now) > 600 Then

KeyPress "F5", 1

Delay 5555

Goto ks

End If

End If

Loop

第1个回答  2017-12-14
因为下面一直Do …… Loop
一开始没找到第一张图,就没有执行这段
ax=intx

ay=inty

t1=now
这一句 If datediff("s", t1, now) > 600 Then 就会因为t1不是时间格式出错,应该就不会执行goto ks本回答被提问者和网友采纳
相似回答