- 按键精灵会员
- 9353194
- 5
- 0
- 12 朵
- 33 个
- 18 个
- 0
- 2024-10-25
|
1#
t
T
发表于 2024-10-27 21:08
|
|只看楼主
- UserVar 扫荡次数=0 "扫荡次数"
- UserVar 收集=DropList{"采集A阶":"A阶"|"采集B阶":"B阶"|"采集C阶":"C阶"|"采集D阶":"D阶"}=0 "星阶采集"
- py=10
- dj = 1
- yc=500
- TracePrint 收集
- If 收集 = 采集A阶 Then
- Call A阶()
- ElseIf 收集 = 采集B阶 Then
- Call B阶()
- ElseIf 收集 = 采集C阶 Then
- Call C阶()
- ElseIf 收集 = 采集D阶 Then
- Call D阶
- Else
- TracePrint "不执行"
- End If
- Sub A阶
- //=========找到co选项卡
- Rem xc
- FindPic xx,yy,pmx,pmy,"D:\软件安装\按键精灵\按键精灵2014\leiting\co.bmp",0.5,aX,aY //测试的时候这里找不到图片,所以先用本地地址测试下,下面
- If aX > 0 And aY > 0 Then //用本地地址的都是在测试
- TracePrint "找到co"
- MoveTo aX + py, aY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到co"
- Goto xc
- End If
- //============找二星第二个co
- Rem exe
- FindPic xx,yy,pmx,pmy,"D:\软件安装\按键精灵\按键精灵2014\leiting\二星一.bmp",0.5,bX,bY
- If bX > 0 And bY > 0 Then
- TracePrint "找到星图"
- MoveTo bbX + py, bbY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到星图"
- Goto exe
- End If
- //===========找到第二个co需要扫荡的关卡
- Rem gk
- FindPic xx,yy,pmx,pmy,"Attachment:\关.bmp",0.5,ccX,ccY
- If ccX > 0 And ccY > 0 Then
- TracePrint "找到关卡"
- MoveTo ccX + 20, ccY + 125
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到关卡"
- Goto gk
- End If
- //===========开始扫荡
- Rem sd
- FindPic xx,yy,pmx,pmy,"Attachment:\扫荡.bmp",0.5,dX,dY
- If dX > 0 And dY > 0 Then
- TracePrint "开始扫荡"
- MoveTo dX + py, dY + py
- Delay yc
- LeftClick dj
- Delay 1200
- LeftClick dj
- Delay yc
- Else
- TracePrint "扫荡停止"
- Goto sd
- End If
- //=========关闭扫荡窗口
- Rem gb
- FindPic xx,yy,pmx,pmy,"Attachment:\关闭.bmp",0.5,eX,eY
- If eX > 0 And eY > 0 Then
- TracePrint "关闭扫荡窗口"
- MoveTo eX + py, eY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到关闭按钮"
- Goto gb
- End If
- //===========返回升级界面
- Rem fh
- FindPic xx,yy,pmx,pmy,"Attachment:\返回.bmp",0.5,fX,fY
- If fX > 0 And fY > 0 Then
- TracePrint "开始返回"
- MoveTo fX + py, fY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "返回停止"
- Goto fh
- End If
- End Sub
- Sub B阶
-
- //=========找到co选项卡
- Rem xc
- FindPic xx,yy,pmx,pmy,"D:\软件安装\按键精灵\按键精灵2014\leiting\co.bmp",0.5,aaX,aaY
- If aaX > 0 And aaY > 0 Then
- TracePrint "找到co"
- MoveTo aaX + py, aaY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到co"
- Goto xc
- End If
- //============找二星第二个co
- Rem exe
- FindPic xx,yy,pmx,pmy,"Attachment:\二星二.bmp",0.5,bbX,bbY
- If bbX > 0 And bbY > 0 Then
- TracePrint "找到星图"
- MoveTo bbX + py, bbY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到星图"
- Goto exe
- End If
- //===========找到第二个co需要扫荡的关卡
- Rem gk
- FindPic xx,yy,pmx,pmy,"Attachment:\关.bmp",0.5,ccX,ccY
- If ccX > 0 And ccY > 0 Then
- TracePrint "找到关卡"
- MoveTo ccX + 95, ccY + 125
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到关卡"
- Goto gk
- End If
- //===========开始扫荡
- Rem sd
- FindPic xx,yy,pmx,pmy,"Attachment:\扫荡.bmp",0.5,ddX,ddY
- If ddX > 0 And ddY > 0 Then
- TracePrint "开始扫荡"
- MoveTo ddX + py, ddY + py
- Delay yc
- LeftClick dj
- Delay 1200
- LeftClick dj
- Delay yc
- Else
- TracePrint "扫荡停止"
- Goto sd
- End If
- //=========关闭扫荡窗口
- Rem gb
- FindPic xx,yy,pmx,pmy,"Attachment:\关闭.bmp",0.5,eeX,eeY
- If eeX > 0 And eeY > 0 Then
- TracePrint "关闭扫荡窗口"
- MoveTo eeX + py, eeY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "未找到关闭按钮"
- Goto gb
- End If
- //===========返回升级界面
- Rem fh
- FindPic xx,yy,pmx,pmy,"Attachment:\返回.bmp",0.5,ffX,ffY
- If ffX > 0 And ffY > 0 Then
- TracePrint "开始返回"
- MoveTo ffX + py, ffY + py
- Delay yc
- LeftClick dj
- Delay yc
- Else
- TracePrint "返回停止"
- Goto fh
- End If
- End Sub
复制代码在属性-自定义界面,选择"采集A阶",启动后还是运行子程序B阶,要么就是没有任何反应.在IF判断"采集"的时候,自定义好像都不调用,实在不知道哪里出了问题.请大老帮忙
|