• 按键公众号 :
按键精灵电脑版
立即下载

软件版本:2014.06
软件大小:22.9M
更新时间:2021-12-03

按键精灵安卓版
立即下载

软件版本:3.7.2
软件大小:46.2M
更新时间:2023-05-10

按键精灵iOS版
立即下载

软件版本:1.8.0
软件大小:29.2M
更新时间:2023-03-21

按键手机助手
立即下载

软件版本:3.8.0
软件大小:262M
更新时间:2023-05-30

快捷导航

登录 后使用快捷导航
没有帐号? 注册

发新话题 回复该主题

关于用户自定义无法调用问题 [复制链接]

1#
  1. UserVar 扫荡次数=0 "扫荡次数"
  2. UserVar 收集=DropList{"采集A阶":"A阶"|"采集B阶":"B阶"|"采集C阶":"C阶"|"采集D阶":"D阶"}=0 "星阶采集"
  3. py=10
  4. dj = 1
  5. yc=500
  6. TracePrint 收集
  7. If 收集 = 采集A阶 Then
  8. Call A阶()
  9. ElseIf 收集 = 采集B阶 Then
  10. Call B阶()
  11. ElseIf 收集 = 采集C阶 Then
  12. Call C阶()
  13. ElseIf 收集 = 采集D阶 Then
  14. Call D阶
  15. Else
  16. TracePrint "不执行"
  17. End If

  18. Sub A阶

  19. //=========找到co选项卡
  20. Rem xc
  21. FindPic xx,yy,pmx,pmy,"D:\软件安装\按键精灵\按键精灵2014\leiting\co.bmp",0.5,aX,aY //测试的时候这里找不到图片,所以先用本地地址测试下,下面
  22. If aX > 0 And aY > 0 Then //用本地地址的都是在测试
  23. TracePrint "找到co"
  24. MoveTo aX + py, aY + py
  25. Delay yc
  26. LeftClick dj
  27. Delay yc
  28. Else
  29. TracePrint "未找到co"
  30. Goto xc
  31. End If
  32. //============找二星第二个co
  33. Rem exe
  34. FindPic xx,yy,pmx,pmy,"D:\软件安装\按键精灵\按键精灵2014\leiting\二星一.bmp",0.5,bX,bY
  35. If bX > 0 And bY > 0 Then
  36. TracePrint "找到星图"
  37. MoveTo bbX + py, bbY + py
  38. Delay yc
  39. LeftClick dj
  40. Delay yc
  41. Else
  42. TracePrint "未找到星图"
  43. Goto exe
  44. End If

  45. //===========找到第二个co需要扫荡的关卡
  46. Rem gk
  47. FindPic xx,yy,pmx,pmy,"Attachment:\关.bmp",0.5,ccX,ccY
  48. If ccX > 0 And ccY > 0 Then
  49. TracePrint "找到关卡"
  50. MoveTo ccX + 20, ccY + 125
  51. Delay yc
  52. LeftClick dj
  53. Delay yc
  54. Else
  55. TracePrint "未找到关卡"
  56. Goto gk
  57. End If

  58. //===========开始扫荡
  59. Rem sd
  60. FindPic xx,yy,pmx,pmy,"Attachment:\扫荡.bmp",0.5,dX,dY
  61. If dX > 0 And dY > 0 Then
  62. TracePrint "开始扫荡"
  63. MoveTo dX + py, dY + py
  64. Delay yc
  65. LeftClick dj
  66. Delay 1200
  67. LeftClick dj
  68. Delay yc
  69. Else
  70. TracePrint "扫荡停止"
  71. Goto sd
  72. End If

  73. //=========关闭扫荡窗口
  74. Rem gb
  75. FindPic xx,yy,pmx,pmy,"Attachment:\关闭.bmp",0.5,eX,eY
  76. If eX > 0 And eY > 0 Then
  77. TracePrint "关闭扫荡窗口"
  78. MoveTo eX + py, eY + py
  79. Delay yc
  80. LeftClick dj
  81. Delay yc
  82. Else
  83. TracePrint "未找到关闭按钮"
  84. Goto gb
  85. End If

  86. //===========返回升级界面
  87. Rem fh
  88. FindPic xx,yy,pmx,pmy,"Attachment:\返回.bmp",0.5,fX,fY
  89. If fX > 0 And fY > 0 Then
  90. TracePrint "开始返回"
  91. MoveTo fX + py, fY + py
  92. Delay yc
  93. LeftClick dj
  94. Delay yc
  95. Else
  96. TracePrint "返回停止"
  97. Goto fh
  98. End If
  99. End Sub
  100. Sub B阶
  101.     

  102. //=========找到co选项卡
  103. Rem xc
  104. FindPic xx,yy,pmx,pmy,"D:\软件安装\按键精灵\按键精灵2014\leiting\co.bmp",0.5,aaX,aaY
  105. If aaX > 0 And aaY > 0 Then
  106. TracePrint "找到co"
  107. MoveTo aaX + py, aaY + py
  108. Delay yc
  109. LeftClick dj
  110. Delay yc
  111. Else
  112. TracePrint "未找到co"
  113. Goto xc
  114. End If
  115. //============找二星第二个co
  116. Rem exe
  117. FindPic xx,yy,pmx,pmy,"Attachment:\二星二.bmp",0.5,bbX,bbY
  118. If bbX > 0 And bbY > 0 Then
  119. TracePrint "找到星图"
  120. MoveTo bbX + py, bbY + py
  121. Delay yc
  122. LeftClick dj
  123. Delay yc
  124. Else
  125. TracePrint "未找到星图"
  126. Goto exe
  127. End If

  128. //===========找到第二个co需要扫荡的关卡
  129. Rem gk
  130. FindPic xx,yy,pmx,pmy,"Attachment:\关.bmp",0.5,ccX,ccY
  131. If ccX > 0 And ccY > 0 Then
  132. TracePrint "找到关卡"
  133. MoveTo ccX + 95, ccY + 125
  134. Delay yc
  135. LeftClick dj
  136. Delay yc
  137. Else
  138. TracePrint "未找到关卡"
  139. Goto gk
  140. End If

  141. //===========开始扫荡
  142. Rem sd
  143. FindPic xx,yy,pmx,pmy,"Attachment:\扫荡.bmp",0.5,ddX,ddY
  144. If ddX > 0 And ddY > 0 Then
  145. TracePrint "开始扫荡"
  146. MoveTo ddX + py, ddY + py
  147. Delay yc
  148. LeftClick dj
  149. Delay 1200
  150. LeftClick dj
  151. Delay yc
  152. Else
  153. TracePrint "扫荡停止"
  154. Goto sd
  155. End If

  156. //=========关闭扫荡窗口
  157. Rem gb
  158. FindPic xx,yy,pmx,pmy,"Attachment:\关闭.bmp",0.5,eeX,eeY
  159. If eeX > 0 And eeY > 0 Then
  160. TracePrint "关闭扫荡窗口"
  161. MoveTo eeX + py, eeY + py
  162. Delay yc
  163. LeftClick dj
  164. Delay yc
  165. Else
  166. TracePrint "未找到关闭按钮"
  167. Goto gb
  168. End If

  169. //===========返回升级界面
  170. Rem fh
  171. FindPic xx,yy,pmx,pmy,"Attachment:\返回.bmp",0.5,ffX,ffY
  172. If ffX > 0 And ffY > 0 Then
  173. TracePrint "开始返回"
  174. MoveTo ffX + py, ffY + py
  175. Delay yc
  176. LeftClick dj
  177. Delay yc
  178. Else
  179. TracePrint "返回停止"
  180. Goto fh
  181. End If
  182. End Sub
复制代码
在属性-自定义界面,选择"采集A阶",启动后还是运行子程序B阶,要么就是没有任何反应.在IF判断"采集"的时候,自定义好像都不调用,实在不知道哪里出了问题.请大老帮忙

发新话题 回复该主题