我完全是个新手,刚刚编了一个rem goto的语句,却不知道错哪了,高手求教啊!
答案:1 悬赏:70 手机版
解决时间 2021-03-25 08:16
- 提问者网友:龅牙恐龙妹
- 2021-03-24 09:20
我完全是个新手,刚刚编了一个rem goto的语句,却不知道错哪了,高手求教啊!
最佳答案
- 五星知识达人网友:我住北渡口
- 2021-03-24 10:13
好多错误啊,有10多处,没法给你一一指出了,自己看代码。另外,按键精灵有智能纠错功能的,你没有去用吗?
rem a
FindPic 0,0,1440,900,"Attachment:\右按钮.bmp",1,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 20
Delay 1000
MoveTo 314, 152
LeftClick 1
Delay 1000
MoveTo 783, 501
LeftClick 1
MoveTo 959, 555
Delay 1000
LeftClick 1
goto x
else
goto a
end if
rem x
FindPic 0,0,1440,900,"Attachment:\加载.bmp",1,intX1,intY1
FindPic 0,0,1440,900,"Attachment:\战绩值.bmp",1,intX2,intY2
FindPic 0,0,1440,900,"Attachment:\离开.bmp",1,intX3,intY3
FindPic 0,0,1440,900,"Attachment:\返回.bmp",1,intX4,intY4
If intX1 > 0 And intY1 > 0 Then
goto x
elseIf intX2 > 0 And intY2 > 0 Then
goto b
elseIf intX3 > 0 And intY3 > 0 Then
goto c
elseIf intX4 > 0 And intY4 > 0 Then
goto d
else
goto a
end if
rem b
FindPic 0,0,1440,900,"Attachment:\战绩值.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
MoveTo 500, 450
RightClick 1
Delay 1000
rightclick 1
MoveTo 700, 450
rightclick 1
Delay 1000
goto b
else
goto c
end if
rem c
FindPic 0,0,1440,900,"Attachment:\离开.bmp",0.5,intX2,intY2
If intX > 0 And intY > 0 Then
MoveTo intX1+3, intY1+10
delay 500
LeftClick 1
goto d
else
goto c
end if
rem d
FindPic 0,0,1440,900,"Attachment:\返回.bmp",0.5,intX2,intY2
If intX > 0 And intY > 0 Then
MoveTo intX1+3, intY1+10
delay 500
LeftClick 1
goto a
else
goto d
end if
还有一些逻辑上的错误我没有去改了,比如最后那个rem d的下一行的后面的变量是intX2和intY2,接下来的判断语句却是intX和intY,再下一行又变为intX1和intY1了,好乱啊。总之你这个代码是没法运行的。你慢慢改吧。追问这些代码刚刚由于复制,有些凌乱,现在我全都改好了~
但是还是调试有错误,就是找很多图那段,估计存在错误
不知道该怎么改。还有我的goto和rem不知道用的对不对
rem a
FindPic 0,0,1440,900,"Attachment:\右按钮.bmp",1,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
LeftClick 20
Delay 1000
MoveTo 314, 152
LeftClick 1
Delay 1000
MoveTo 783, 501
LeftClick 1
MoveTo 959, 555
Delay 1000
LeftClick 1
goto x
else
goto a
end if
rem x
FindPic 0,0,1440,900,"Attachment:\加载.bmp",1,intX1,intY1
FindPic 0,0,1440,900,"Attachment:\战绩值.bmp",1,intX2,intY2
FindPic 0,0,1440,900,"Attachment:\离开.bmp",1,intX3,intY3
FindPic 0,0,1440,900,"Attachment:\返回.bmp",1,intX4,intY4
If intX1 > 0 And intY1 > 0 Then
goto x
elseIf intX2 > 0 And intY2 > 0 Then
goto b
elseIf intX3 > 0 And intY3 > 0 Then
goto c
elseIf intX4 > 0 And intY4 > 0 Then
goto d
else
goto a
end if
rem b
FindPic 0,0,1440,900,"Attachment:\战绩值.bmp",0.5,intX,intY
If intX > 0 And intY > 0 Then
MoveTo 500, 450
RightClick 1
Delay 1000
rightclick 1
MoveTo 700, 450
rightclick 1
Delay 1000
goto b
else
goto c
end if
rem c
FindPic 0,0,1440,900,"Attachment:\离开.bmp",0.5,intX2,intY2
If intX > 0 And intY > 0 Then
MoveTo intX1+3, intY1+10
delay 500
LeftClick 1
goto d
else
goto c
end if
rem d
FindPic 0,0,1440,900,"Attachment:\返回.bmp",0.5,intX2,intY2
If intX > 0 And intY > 0 Then
MoveTo intX1+3, intY1+10
delay 500
LeftClick 1
goto a
else
goto d
end if
还有一些逻辑上的错误我没有去改了,比如最后那个rem d的下一行的后面的变量是intX2和intY2,接下来的判断语句却是intX和intY,再下一行又变为intX1和intY1了,好乱啊。总之你这个代码是没法运行的。你慢慢改吧。追问这些代码刚刚由于复制,有些凌乱,现在我全都改好了~
但是还是调试有错误,就是找很多图那段,估计存在错误
不知道该怎么改。还有我的goto和rem不知道用的对不对
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯