求解按键精灵源码有没有错误 为什么 总运行不了

UserVarVar1=DropList{"选项1":"1"|"选项2":"2"|"选项3":"3"|"选项4":"4"|"选项5":"5"}=0"renwu"IfVar... UserVar Var1=DropList{"选项1":"1"|"选项2":"2"|"选项3":"3"|"选项4":"4"|"选项5":"5"}=0 "renwu"
If Var1 = 1 Then
FindPic 0,0,1024,768,"Attachment:\周泰.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
End If
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
Goto f
elseIf Var1 = 4 Then
FindPic 0,0,1024,768,"Attachment:\文央.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
End If
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
Goto f
ElseIf Var1=5 Then
FindPic 0,0,1024,768,"Attachment:\狮子.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
End If
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
Goto f
ElseIf Var1 = 2 Then
FindPic 0,0,1024,768,"Attachment:\黄忠.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
End If
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
Goto f
ElseIf Var1=3 Then
FindPic 0,0,1024,768,"Attachment:\蒲元.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
End If
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
End If
Rem f
展开
 我来答
帐号已注销
推荐于2016-11-04 · TA获得超过1.1万个赞
知道大有可为答主
回答量:6449
采纳率:69%
帮助的人:2276万
展开全部
你的逻辑有错:
FindPic 0,0,1024,768,"Attachment:\周泰.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
End If
你看按键精灵例子,人家那个End If 放在哪了。根据你写的代码,我也明白你想做什么,不过我想你应该是循环找图才对,由于你没有循环找图,我就根据你代码逻辑修改。代码实际不用写那么多,只要写一次找图就行了,代码如下:
UserVar i=DropList{"周泰":"1"|"黄忠":"2"|"蒲元":"3"|"文央":"4"|"狮子":"5"}=0 "renwu"
Dim Pics(5)
Pics(1) = "周泰.bmp"
Pics(2) = "黄忠.bmp"
Pics(3) = "蒲元.bmp"
Pics(4) = "文央.bmp"
Pics(5) = "狮子.bmp"
FindPic 0, 0, 1024, 768, "Attachment:\" & Pics(i), 0.9, intX, intY
If intX > 0 Then
Delay 200
MoveTo intX, intY
Delay 200
LeftClick 1
End If
不愁水瓶
2014-11-17 · TA获得超过374个赞
知道小有建树答主
回答量:594
采纳率:0%
帮助的人:213万
展开全部
你把标记F 弄到下面干什么 那不直接就跳到结束了吗? 把标记F 弄到第二段代码,就是第一个变量后面
更多追问追答
追问
下面还有程序 写不下了   标记您帮我看看我这个实现选择选图之后单机了吗
追答
怎么会写不下啊 你写20篇都没问题 我也在写梦三国的本子要不加QQ聊455619333
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式