按键精灵脚本:下面这段程序怎么样在循环后跳出循环,就是找不到图片后跳出循环
WhileTrueFindPicintX-719,intY+213,intX-635,intY+267,"Attachment:\3.bmp",0.8,BX,BYIfBX...
While True
FindPic intX-719,intY+213,intX-635,intY+267,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress h, 1
End If
FindPic intX-719,intY+148,intX-635,intY+202,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress g, 1
End If
FindPic intX-230,intY+86,intX-154,intY+136,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress n, 1
End If
FindPic intX-230,intY+17,intX-154,intY+71,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress m, 1
End If
Wend 展开
FindPic intX-719,intY+213,intX-635,intY+267,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress h, 1
End If
FindPic intX-719,intY+148,intX-635,intY+202,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress g, 1
End If
FindPic intX-230,intY+86,intX-154,intY+136,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress n, 1
End If
FindPic intX-230,intY+17,intX-154,intY+71,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress m, 1
End If
Wend 展开
1个回答
展开全部
可以用
rem aaa
goto aaa
这个跳出。
rem aaa
goto aaa
这个跳出。
追问
可是我需要它循环到找不到图了才跳出额,循环条件是true
追答
不知道有没有别的比较好的方法,我有个笨方法。。。
每个找图都加个else 像
FindPic intX-230,intY+17,intX-154,intY+71,"Attachment:\3.bmp",0.8,BX,BY
If BX > 0 And BY > 0 Then
Delay 200
KeyPress m, 1
else
a=1
End If
a,b,c,d,e.....
然后最后判断a,b,c,d,e...是否等于1,等于1就goto ...
我就是不知道你为什么要用while 这个循环,不用的话,找不到图不就直接跳过去了。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询