按键精灵脚本,无限循环 先执行一个开头,a循环: 然后找图,点击无限循环 直到找不到这个图 然后
按键精灵脚本,无限循环先执行一个开头,a循环:然后找图,点击无限循环直到找不到这个图然后执行b循环循环到找不到这个图退出循环如何实现开头MoveTo364,221Dela...
按键精灵脚本,无限循环 先执行一个开头,a循环: 然后找图,点击无限循环 直到找不到这个图 然后执行b循环 循环到找不到这个图 退出循环 如何实现 开头 MoveTo 364, 221
Delay 16
LeftClick 1
Delay 16
MoveTo 253, 219
Delay 16
LeftClick 1 a循环 Delay 100
FindPic 0,0,1680,1050,"c:\222.bmp",0.8,intX,intY
If intX > 0 And intY > 0 Then
Delay 50
MoveTo intX+37, intY+34
LeftClick 2
Delay 100
FindPic 0,0,1680,1050,"c:\555.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 50
MoveTo intX+37, intY+34
LeftClick 2
End If
Delay 500
FindPic 0, 0, 1680, 1050, "c:\333.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
Delay 50
MoveTo intX+0, intY+0
LeftClick 2
End If
Delay 100
FindPic 0, 0, 1680, 1050, "c:\444.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
Delay 50
MoveTo intX+0, intY+0
LeftClick 2 b循环
Delay 16
MoveTo 774, 216
Delay 16
LeftClick 15
Delay 16
MoveTo 324, 208
Delay 16
LeftClick 1
Delay 100
FindPic 0,0,1680,1050,"c:\222.bmp",0.8,intX,intY
If intX > 0 And intY > 0 Then
Delay 50
MoveTo intX+37, intY+34
LeftClick 2
Delay 100
FindPic 0,0,1680,1050,"c:\555.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
展开
1个回答
展开全部
rem Begin
MoveTo 364, 221
Delay 16
LeftClick 1
call A循环
sub A循环
i = 0
While i = 0
FindPic 0,0,1680,1050,"c:\222.bmp",0.8,intX,intY
FindPic 0,0,1680,1050,"c:\555.bmp",0.9,intX1,intY1
FindPic 0, 0, 1680, 1050, "c:\333.bmp", 0.9, intX2, intY2
FindPic 0, 0, 1680, 1050, "c:\444.bmp", 0.9, intX3, intY3
If intX > 0 or intX1 > 0 Then
i=1
Delay 50
MoveTo intX+37, intY+34
LeftClick 2
call B循环
elseIf intX2 > 0 or intX3> 0 Then
i=1
Delay 50
MoveTo intX+0, intY+0
LeftClick 2
call B循环
endif
wend
end sub
sub B循环
i = 0
While i = 0
FindPic 0,0,1680,1050,"c:\222.bmp",0.8,intX,intY
FindPic 0,0,1680,1050,"c:\555.bmp",0.9,intX1,intY1
FindPic 0, 0, 1680, 1050, "c:\333.bmp", 0.9, intX2, intY2
FindPic 0, 0, 1680, 1050, "c:\444.bmp", 0.9, intX3, intY3
If intX < 0 or intX1 < 0 Then
i=1
Delay 50
MoveTo intX+37, intY+34
LeftClick 2
call A循环
elseIf intX2 < 0 or intX3< 0 Then
i=1
Delay 50
MoveTo intX+0, intY+0
LeftClick 2
call A循环
endif
wend
end sub
MoveTo 364, 221
Delay 16
LeftClick 1
call A循环
sub A循环
i = 0
While i = 0
FindPic 0,0,1680,1050,"c:\222.bmp",0.8,intX,intY
FindPic 0,0,1680,1050,"c:\555.bmp",0.9,intX1,intY1
FindPic 0, 0, 1680, 1050, "c:\333.bmp", 0.9, intX2, intY2
FindPic 0, 0, 1680, 1050, "c:\444.bmp", 0.9, intX3, intY3
If intX > 0 or intX1 > 0 Then
i=1
Delay 50
MoveTo intX+37, intY+34
LeftClick 2
call B循环
elseIf intX2 > 0 or intX3> 0 Then
i=1
Delay 50
MoveTo intX+0, intY+0
LeftClick 2
call B循环
endif
wend
end sub
sub B循环
i = 0
While i = 0
FindPic 0,0,1680,1050,"c:\222.bmp",0.8,intX,intY
FindPic 0,0,1680,1050,"c:\555.bmp",0.9,intX1,intY1
FindPic 0, 0, 1680, 1050, "c:\333.bmp", 0.9, intX2, intY2
FindPic 0, 0, 1680, 1050, "c:\444.bmp", 0.9, intX3, intY3
If intX < 0 or intX1 < 0 Then
i=1
Delay 50
MoveTo intX+37, intY+34
LeftClick 2
call A循环
elseIf intX2 < 0 or intX3< 0 Then
i=1
Delay 50
MoveTo intX+0, intY+0
LeftClick 2
call A循环
endif
wend
end sub
更多追问追答
追问
这个鼠标这样 能识别分别 1 2 3 4吗, 这个开头是只是脚本开始时执行一次。后面开始循环a a循环到找不到,中间还有一点代码(执行一遍),然后循环b 循环到找不到位置,退出循环。
不行,这样找不到图,
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询