按键精灵代码最后的rem a处单独运行正常,一起运行总是鼠标极度偏移,请问咋回事?
RembWhile1=1FindPic0,0,1024,768,"Attachment:\答1.bmp",0.8,x,yIfx>0ThenMoveToX+7,Y+6Lef...
Rem b
While 1 = 1
FindPic 0, 0, 1024, 768, "Attachment:\答1.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答2.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答3.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答4.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答5.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答6.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
//
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答7.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答8.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答9.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答10.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
Wend
Rem a
FindPic 0, 0, 1024, 768, "Attachment:\tj.bmp", 0.8, intX, intY
If intX > 0 Then
MoveTo intX, intY
Delay 100
LeftClick 1
Delay 2000
End If
Goto b
下面是精简的代码,不知为什么不能正确点击?
Dim a(9)
a(0) = "Attachment:\答1.bmp"
a(1) = "Attachment:\答2.bmp"
a(2) = "Attachment:\答3.bmp"
a(3) = "Attachment:\答4.bmp"
a(4) = "Attachment:\答5.bmp"
a(5) = "Attachment:\答6.bmp"
a(6) = "Attachment:\答7.bmp"
a(7) = "Attachment:\答8.bmp"
a(8) = "Attachment:\答9.bmp"
a(9) = "Attachment:\答10.bmp"
Call 查找图片数组()
EndScript
Sub 查找图片数组()
For i=0 to 9
FindPic 0, 0, 1024, 768, a(i), 0.9, X, Y
If x>0 and y>0 Then
MoveTo x+7,y+6
LeftClick 1
Exit For
End If
next
End Sub 展开
While 1 = 1
FindPic 0, 0, 1024, 768, "Attachment:\答1.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答2.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答3.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答4.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答5.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答6.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
//
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答7.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答8.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答9.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
FindPic 0, 0, 1024, 768, "Attachment:\答10.bmp", 0.8, x, y
If x > 0 Then
MoveTo X + 7, Y + 6
LeftClick 1
goto a
End If
Wend
Rem a
FindPic 0, 0, 1024, 768, "Attachment:\tj.bmp", 0.8, intX, intY
If intX > 0 Then
MoveTo intX, intY
Delay 100
LeftClick 1
Delay 2000
End If
Goto b
下面是精简的代码,不知为什么不能正确点击?
Dim a(9)
a(0) = "Attachment:\答1.bmp"
a(1) = "Attachment:\答2.bmp"
a(2) = "Attachment:\答3.bmp"
a(3) = "Attachment:\答4.bmp"
a(4) = "Attachment:\答5.bmp"
a(5) = "Attachment:\答6.bmp"
a(6) = "Attachment:\答7.bmp"
a(7) = "Attachment:\答8.bmp"
a(8) = "Attachment:\答9.bmp"
a(9) = "Attachment:\答10.bmp"
Call 查找图片数组()
EndScript
Sub 查找图片数组()
For i=0 to 9
FindPic 0, 0, 1024, 768, a(i), 0.9, X, Y
If x>0 and y>0 Then
MoveTo x+7,y+6
LeftClick 1
Exit For
End If
next
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询