我完全是个新手,刚刚编了一个rem goto的语句,却不知道错哪了,高手求教啊!
remaFindPic0,0,1440,900,"Attachment:\右按钮.bmp",1,intX,intYIfintX>0AndintY>0ThenMoveToi...
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
endif
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 (第24行)
goto x
else If intX2 > 0 And intY2 > 0 Then
goto b
else If intX3 > 0 And intY3 > 0 Then
goto c
else If intX4 > 0 And intY4 > 0 Then
goto d
else goto a
endif
rem bFindPic 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 if goto c
endif
rem cFindPic 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 if goto c
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
eles if goto d
这是调试结果
语法错误:脚本 三国goto测试为成功 ,第24行,第1个字符:(错误码0)没有找到合法的符号。
语法错误:脚本 三国goto测试为成功 ,第24行,第10个字符:(错误码0)没有找到合法的符号。
语法错误:脚本 三国goto测试为成功 ,第24行,第24个字符:(错误码0)没有找到合法的符号。
语法错误:脚本 三国goto测试为成功 ,第26行,第1个字符:(错误码0)没有找到合法的符号。 展开
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
endif
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 (第24行)
goto x
else If intX2 > 0 And intY2 > 0 Then
goto b
else If intX3 > 0 And intY3 > 0 Then
goto c
else If intX4 > 0 And intY4 > 0 Then
goto d
else goto a
endif
rem bFindPic 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 if goto c
endif
rem cFindPic 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 if goto c
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
eles if goto d
这是调试结果
语法错误:脚本 三国goto测试为成功 ,第24行,第1个字符:(错误码0)没有找到合法的符号。
语法错误:脚本 三国goto测试为成功 ,第24行,第10个字符:(错误码0)没有找到合法的符号。
语法错误:脚本 三国goto测试为成功 ,第24行,第24个字符:(错误码0)没有找到合法的符号。
语法错误:脚本 三国goto测试为成功 ,第26行,第1个字符:(错误码0)没有找到合法的符号。 展开
1个回答
展开全部
好多错误啊,有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了,好乱啊。总之你这个代码是没法运行的。你慢慢改吧。
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不知道用的对不对
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询