
求解按键精灵源码有没有错误 为什么 总运行不了
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 展开
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 展开
展开全部
你的逻辑有错:
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
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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |