按键精灵的抓图功能里,想要用抓图功能将截取的3个图片依次点击,请问该如何编程?

FindPic 0,0,1024,768,"D:\1.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
Delay 1000
FindPic 0,0,1024,768,"D:\2.bmp",0.9,intX,intY
if intX > 0 and intY > 0 then
MoveTo intX, intY
LeftClick 1
Delay 1000
FindPic 0,0,1024,768,"D:\3.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 1
End If
我知道将3个叠加起来的格式肯定是不对的,那么请问该如何修改呢?请大神们赐教。

Dim intX, intY,a
a=1

Do
Delay 100
If a = 1 Then

FindPic 0, 0, 0, 0, "Attachment:图1.png","000000",0,0.9, intX, intY
If intX >-1 then
TracePrint "找到啦,坐标是"&intX&","&intY
Tap intX,intY
a=2
Else
TracePrint "没找到"
End If
End If
If a = 2 Then

FindPic 0, 0, 0, 0, "Attachment:图2.png","000000",0, 0.9, intX, intY
If intX >-1 then
TracePrint "找到啦,坐标是"&intX&","&intY
Tap intX,intY
a=3
Else
TracePrint "没找到"
End If
End If

If a = 3 Then

FindPic 0, 0, 0, 0, "Attachment:图3.png","000000",0, 0.9, intX, intY
If intX >-1 then
TracePrint "找到啦,坐标是"&intX&","&intY
Tap intX,intY
a=4
Else
TracePrint "没找到"
End If
End If
If a = 4 Then

FindPic 0, 0, 0, 0, "Attachment:图4.png","000000",0, 0.9, intX, intY
If intX >-1 then
TracePrint "找到啦,坐标是"&intX&","&intY
Tap intX,intY
a=5
Else
TracePrint "没找到"
End If
End If
If a = 5 Then

FindPic 0, 0, 0, 0, "Attachment:图5.png","000000",0, 0.9, intX, intY
If intX >-1 then
TracePrint "找到啦,坐标是"&intX&","&intY
Tap intX,intY
a=1
Else
TracePrint "没找到"
End If
End If
Loop
自己替换下5个图 记得放附件

给你做个参考 以前帮别人写的
这个是安卓版本写法PC按键精灵自己改下
温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-12-25
可以用,不用改
相似回答