按键精灵鼠标右键代码有这段代码就卡

按键精灵开发教程:QUI界面不卡死_图文_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
按键精灵开发教程:QUI界面不卡死
&&简单游戏脚本制作开发工具,
按键精灵论坛配有丰富的简单脚本开发
教程,学习游戏脚本开发必备软件,教你怎么开发脚本,如何快速制作脚本。
阅读已结束,下载本文需要
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,同时保存到云知识,更方便管理
加入VIP
还剩4页未读,
定制HR最喜欢的简历
你可能喜欢你的位置:
启动脚本按键精灵就卡死
00:02:10 |
来源: 按键精灵资源站
昨天用得好好的,今天开刚开脚本就卡掉了。本来以为是改错了,可是开系统自带的那些脚本一个都没用,按下快捷键按键精灵就卡住了,点一下主以后只能关……,其他按的一点反应都没有完全卡住。
就在刚才又更新了9.50.11632,依然没用。
以前也发生过,过段时间不用又好了,就没提。现在趁问题档口向列为求助啊!!!
重启,重装按键 都搞过了。具体以那个“按键精灵自我介绍”脚本为例 我把其他都关了。(反正重装了全是自带的,不应该存在啥脚本自己问题)把他的有效。这时没事,我还开了个任务管理器。按下Ctrl+9,按键精灵界面无变化,管理器里也无变化。(没变化就是不正常好不好)这时点击有效那一列方框是点不起来的,点到上面菜单栏啥的,按键自带的那个窗口就会变成XP自带的窗口形状(就是那个蓝色标题栏,方型的三按钮关闭啥的)。同时任务管理器里按键精灵一个变两,状态由正在运行变成未响应。2个按键精灵未响应!!!我发誓我就开这两个东西,XP自带防火墙关了毒霸关了。(再详细点就是任务管理器里多出来那个没自带图标的,就一个框框无图标.exe的那样子)
睡觉去了 明天看看再说吧。先向各位求助了有没有大神帮忙看看 为什么我的脚本运行久了很卡 _ 按键精灵手机版 - 按键精灵论坛
软件版本:2014.05软件大小:21.6M更新时间:07-04
软件版本:3.2.9软件大小:62.5M更新时间:12-07
软件版本:1.3.1软件大小:29.2M更新时间:09-29
软件版本:1.1.0软件大小:12.3M更新时间:12-29
查看: 296|回复: 2
这个是一个游戏的练级脚本,测试的时候 都很流畅 放模拟器上多开 一段时间就非常卡,模拟器经常卡死,请问是代码问题吗?该如何优化会更流畅呢?Dim intX,intY,复活,intX1,intY1,索引值Dim qq文件路径=&/sdcard/Pictures/qq.txt& dim 文件路径=&/sdcard/&Dim 顺序,c=0,铭文=0,铭文次数,极限=0,九级=0,九级失败=0,读取顺序文本的次数///TracePrint SetDictEx(0, &Attachment:mq_soft.txt&)TracePrint UseDict(0)//以上两句脚本只需要调用一次
调用字库RunApp &com.tencent.tmgp.sgame&
If ReadUIConfig(&账号情况&)=0 then //新号练级
Call File.Write(文件路径 & &顺序.txt&, &0&)ElseIf
ReadUIConfig(&账号情况&)=1 then //新号练级
Call File.Write(文件路径 & &顺序.txt&, &1&)ElseIf
ReadUIConfig(&账号情况&)=2 then //新号练级
Call File.Write(文件路径 & &顺序.txt&, &2&)ElseIf
ReadUIConfig(&账号情况&)=3 then //新号练级
Call File.Write(文件路径 & &顺序.txt&, &3&)ElseIf
ReadUIConfig(&账号情况&)=4 then //新号练级
Call File.Write(文件路径 & &顺序.txt&, &4&)ElseIf
ReadUIConfig(&账号情况&)=5 then //新号练级End IfShowMessage Int(File.Read(文件路径 & &顺序.txt&))Delay 1000Call 流程()
Function 流程()
顺序 = Int(File.Read(文件路径 & &顺序.txt&))运行次数 = 运行次数 + 1
If 运行次数 & 10 Then
运行次数 = 0
Sys.ClearMemory() //释放内存
ShowMessage 顺序
TracePrint 顺序
If 顺序 = 0 Then
Call 重新开始()
ElseIf 顺序 = 1 Then
Call 打开邮件()
ElseIf 顺序 = 2 Then
Call 购买铭文()
ElseIf 顺序 = 3 Then
Call 刷图()
ElseIf 顺序 = 4 Then
Call 换号()
FindPic 0,0,0,0,&Attachment:接受协议.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &接受协议&
FindPic 0,0,0,0,&Attachment:关闭1.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &关闭&
FindPic 0,0,0,0,&Attachment:关闭2.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &关闭&
FindPic 0,0,0,0,&Attachment:关闭3.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &关闭&
FindPic 0,0,0,0,&Attachment:确定.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &确定&
FindPic 0,0,0,0,&Attachment:确定2.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX,intY
FindPic 0,0,0,0,&Attachment:确定3.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &确定&
Tap intX,intY
FindPic 0,0,0,0,&Attachment:休息.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &休息&
Tap intX, intY
Loop&&&&End FunctionFunction 重新开始()
FindPic 0,0,0,0,&Attachment:好久不见.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &好久不见&
FindPic 0,0,0,0,&Attachment:接受赠礼.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &接受赠礼&
FindPic 0,0,0,0,&Attachment:回归.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &回归&
FindPic 0,0,0,0,&Attachment:领取礼包.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &领取礼包&
FindPic 0,0,0,0,&Attachment:铭文.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Call File.Write(文件路径&&顺序.txt&,&1&)
End IfEnd FunctionFunction 打开邮件()&&&&
FindPic 0,0,0,0,&Attachment:邮件.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap 688,1057//邮件
ShowMessage &打开邮件&
FindPic 0,0,0,0,&Attachment:系统邮件.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &系统邮件&
FindPic 0,0,0,0,&Attachment:快速删除.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
FindPic 0,0,0,0,&Attachment:快速领取.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
ShowMessage &快速领取&
ShowMessage &退出邮件&
Tap 687,74//返回
Call File.Write(文件路径&&顺序.txt&,&2&)
End IfEnd FunctionFunction 购买铭文()
FindPic 0,0,0,0,&Attachment:铭文.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &购买铭文&
Tap intX, intY
Delay 5000
FindPic 0,0,0,0,&Attachment:购买铭文.png&,&,0.9,intX1,intY1
If intX1 & -1 And intY1 & -1 Then
ShowMessage &购买铭文&
Tap intX1, intY1
Delay 1000
FindPic 0,0,0,0,&Attachment:确定3.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &确定&
Tap intX, intY
Delay 5000
FindPic 0,0,0,0,&Attachment:点券.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &没点券了,取消返回&
Delay 2000
Tap 232,515//取消
Tap intX1, intY1
Delay 3000
Tap 553, 1154
铭文次数=铭文次数+1
ShowMessage &添加符文:& & 铭文次数
Delay 1500
Delay 1000
ShowMessage &返回&
Delay 3000
Tap 681,73//返回
Call File.Write(文件路径&&顺序.txt&,&3&)
End IfEnd FunctionFunction 刷图()
FindPic 0,0,0,0,&Attachment:冒险模式.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &冒险模式&
Tap intX,intY
FindPic 0,0,0,0,&Attachment:挑战.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &挑战&
Tap intX,intY
FindPic 0,0,0,0,&Attachment:自动.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &自动&
Tap intX,intY
FindPic 0,0,0,0,&Attachment:挑战完成.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &挑战完成&
Tap intX,intY
If c = 0 Then
FindPic 0,0,0,0,&Attachment:返回.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Call 级数()
ShowMessage &返回&
Delay 2000
Tap 67,857//返回
FindPic 0,0,0,0,&Attachment:下一步.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Call 选关()
TracePrint 九级
ElseIf c = 1 Then
FindPic 0,0,0,0,&Attachment:再次挑战.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Call 级数()
If 九级 = 1 Then
Delay 2000
Tap 67,857//返回
Call 选关()
TracePrint 九级
ShowMessage &再次挑战&
Delay 2000
Tap 59,1068//再次挑战
FindPic 0,0,0,0,&Attachment:闯关.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Delay 2000
call 检查英雄()
ShowMessage &闯关&
Tap 110,979//闯关
FindPic 0,0,0,0,&Attachment:跳过.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &跳过&
Tap intX,intY
FindPic 0,0,0,0,&Attachment:复活.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &复活&
复活 = 复活 + 1
If 复活 & 2 Then
ShowMessage &挑战极限&
Delay 1000
Call 失败()
Tap intX, intY
Delay 2000
FindPic 0,0,0,0,&Attachment:点券.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &没点券了,取消&
Tap 226,513
FindPic 0,0,0,0,&Attachment:返回2.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Call 失败()
ShowMessage &返回&
Tap intX, intY
End FunctionFunction 失败()
TracePrint 九级
FindPic 0,0,0,0,&Attachment:失败.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap intX, intY
极限 = 极限 + 1
If 九级 = 1 Then //退出战场 重新去废都 刷循环
ShowMessage &九级挑战失败&
九级失败 = 1
ShowMessage &挑战失败&
Delay 1000
Tap 66,637//返回
Call 流程()
Delay 1000End FunctionFunction 级数()
索引值 = FindStr(408,735, 447,807, &8|9|10&, &F2EBDB-101010&, 0.9, intX, intY)
Select Case 索引值
ShowMessage &8级了&
TracePrint &8级了&
Delay 1000
ShowMessage &9级了&
TracePrint &9级了&
Delay 1000
If 九级失败 = 1 Then
ShowMessage &继续循环推图&
Delay 1000
ShowMessage &10级了&
TracePrint &10级了&
Delay 1000
Call File.Write(文件路径&&顺序.txt&,&4&)
End Select
NextEnd FunctionFunction 选关()
Rem 重新选
ShowMessage &选关&
Delay 1000
TracePrint 九级
FindPic 0,0,0,0,&Attachment:返回.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap 67,857//返回
FindPic 0,0,0,0,&Attachment:闯关.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
Tap 681,73//返回
FindPic 0,0,0,0,&Attachment:选关.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage 极限
Delay 1000
If 极限 = 0 Then
ShowMessage &废都&
Tap 347,302//学院
Delay 2000
Tap 507, 306//废都
ElseIf 极限 = 1 Then
ShowMessage &学院&
Tap 507, 306//废都
Delay 2000
Tap 347, 302 //学院
ElseIf 极限 & 1 Then
If 九级 = 1 Then
ShowMessage &九级战场&
Tap 325,310//学院
Delay 2000
Tap 156,302//战场
ShowMessage &开始循环推图&
Tap 347, 302 //学院
Delay 2000
Tap 509, 263//废都
Delay 2000
Tap 410,797//魔女
ShowMessage &下一步&
Delay 2000
Tap 70,1071//下一步
call 流程()
ShowMessage &判断&
Delay 1000
FindPic 0,0,0,0,&Attachment:下一步.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
FindPic 308,516,368,719,&Attachment:最后一关.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &最后一关,切换下一个地图&
Delay 1000
极限 = 极限 + 1
Delay 2000
Goto 重新选
ShowMessage &下一步&
Delay 2000
Tap 70,1071//下一步
Delay 2000
call 流程()
Delay 2000
loopEnd FunctionFunction 检查英雄()
FindPic 227,942,322,1049,&Attachment:没英雄.png&,&,0.9,intX1,intY1
If intX1 & -1 And intY1 & -1 Then
ShowMessage &没英雄了&
Tap 107, 730//补英雄
FindPic 0,0,0,0,&Attachment:英雄.png&,&,0.9,intX,intY
If intX & -1 And intY & -1 Then
ShowMessage &补充英雄&
Delay 2000
Tap 567,63//第一个英雄
Delay 2000
Tap 426,61//第二个英雄
Delay 2000
Tap 421,196//第三个英雄
Delay 2000
ShowMessage &补英雄&
Delay 1000
Tap 107, 730//补英雄
Delay 2000
Tap 43,1170//确定
Delay 5000
NextEnd FunctionFunction 换号()
Call File.Write(文件路径&&顺序.txt&,&4&)
ShowMessage &换号中&
dim 窗口编号=ReadUIConfig(&窗口编号&)
Delay 2000
LoopEnd Function
过大年勋章俩小福娃给大家拜年啦!双十一绝版纪念勋章双十一绝版纪念勋章单身汪勋章单身贵族的专属勋章按键精灵开发者6级(新浪V认证)通过新浪微博加V后自动发放,并替换普通的认证6级勋章。 微博达人(90天)完成新浪微博加V的奖励,结合活动不定期开放申请。幸运草勋章(永久)商业小精灵限时活动勋章。官方脚本作者工会官方脚本作者工会专属勋章 鹰眼勋章鹰眼注册用户专属勋章黄瓜勋章(永久)体验商业小精灵活动的奖励按键卫士(90天)参与“打击山寨,维护按键”活动图灵勋章参与按键精灵验证码识别大赛奖励按键图书勋章尊贵的按键图书用户小红帽对论坛提出良好建议(可向管理员申请)学有所成学有所成勋章,新手步入按键学堂的第一枚勋章
您好, 多加点延迟吧. 第一个 Do 循环 这么多操作 只有 一个 50 的延迟 是必定能执行到的. CPU负担太重了. 延迟要放对位置, 让 脚本执行几个步骤后就有个休息的地方. 你大部分延迟都加在判断里面, 万一判断不成立呢?
闽网文 (-037号

我要回帖

更多关于 按键精灵 代码740 的文章

 

随机推荐