按键精灵怎么循环识别5个图片然后点击图片呢?
答案:1 悬赏:40 手机版
解决时间 2021-04-28 18:28
- 提问者网友:感性作祟
- 2021-04-27 19:33
按键精灵怎么循环识别5个图片然后点击图片呢?
最佳答案
- 五星知识达人网友:不想翻身的咸鱼
- 2021-04-27 19:43
Dim intX,intY,A
While A = 2
FindPic 0, 0, 0, 0, "Attachment:图片1png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片2png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片3png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片4png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片5png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
Wend
//先定义变量intX,intY,A
A=0
如果条件 A=0 那么循环下面指令(找图1,2,3,4,5)
找图1
找图2
找图3
找图4
找图5
找到图片延迟500毫秒点击图片所在位置(图片位置计算在截图右上角,所以 你可以把点击图片intX,intY都加上5个坐标,例子:tap intX+5,intY+5)
如果找到其中一张图片就结束循环,关闭运行,如果不需要就把每个找图里面的A=3 删除
希望采纳,谢谢
While A = 2
FindPic 0, 0, 0, 0, "Attachment:图片1png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片2png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片3png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片4png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
FindPic 0, 0, 0, 0, "Attachment:图片5png", "000000", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
A = 3
Delay 500
Tap intX,intY
End If
Wend
//先定义变量intX,intY,A
A=0
如果条件 A=0 那么循环下面指令(找图1,2,3,4,5)
找图1
找图2
找图3
找图4
找图5
找到图片延迟500毫秒点击图片所在位置(图片位置计算在截图右上角,所以 你可以把点击图片intX,intY都加上5个坐标,例子:tap intX+5,intY+5)
如果找到其中一张图片就结束循环,关闭运行,如果不需要就把每个找图里面的A=3 删除
希望采纳,谢谢
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯