• 新浪微博:
  • 微信 :
按键精灵电脑版
立即下载

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

按键精灵安卓版
立即下载

软件版本:3.3.8
软件大小:62.5M
更新时间:12-18

按键精灵iOS版
立即下载

软件版本:1.7.1
软件大小:29.2M
更新时间:06-22

最新企业版UiBot
立即下载

软件版本:3.3
软件大小:282M
更新时间:08-06

快捷导航

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

登录 注册
发新话题 回复该主题

[问题] 加快找图速度 [复制链接]

1#
各位大侠:
我自己编了个小程序,就是根据弹出窗口(窗口位置固定)来决定下一步按键,受制于网络传输和屏幕显示速率,感觉程序运行不够快,我想加快程序的运行效率,除限定找图区域外,还有什么别的方法?从后台找图或句柄操作可行吗?请高人指教!

2#

Do Until getcolor1 = "000000"
FindPic 400, 350, 650, 500, "Attachment:\pysw.bmp", 0.9, x17, y17
FindPic 400, 350, 650, 500,"Attachment:\yf.bmp", 0.9, x18, y18
FindPic 250, 350, 650, 500, "Attachment:\chucuo.bmp", 0.9, x19, y19
FindPic 400, 300, 650, 500, "Attachment:\chaoshi.bmp", 0.9, x20, y20
FindPic 250, 350, 650, 500, "Attachment:\wzcw.bmp", 0.9, x21, y21
If x17 > 0 and y17> 0 Then
KeyPress "Enter", 1
ElseIf x18 > 0 and y18 > 0 Then
KeyPress "N", 1
ElseIf x19 > 0 and y19> 0 Then
KeyPress "Enter", 1
ElseIf x20 > 0 and y20 > 0 Then
KeyPress "Enter", 1
ElseIf x21 > 0 and y21> 0 Then
KeyPress "Enter", 1
End If
KeyDown 18, 1
KeyPress 82, 1
KeyUp 18, 1
Delay ys
GetColor1=GetPixelColor(33,190)
Loop

3#

把图截上来
再放上你的代码才可以优化代码结构

4#

Do Until getcolor1 = "000000"
FindPic 400, 350, 650, 500, "Attachment:\pysw.bmp", 0.9, x17, y17
FindPic 400, 350, 650, 500,"Attachment:\yf.bmp", 0.9, x18, y18
FindPic 250, 350, 650, 500, "Attachment:\chucuo.bmp", 0.9, x19, y19
FindPic 400, 300, 650, 500, "Attachment:\chaoshi.bmp", 0.9, x20, y20
FindPic 250, 350, 650, 500, "Attachment:\wzcw.bmp", 0.9, x21, y21
If x17 > 0 and y17> 0 Then
KeyPress "Enter", 1
ElseIf x18 > 0 and y18 > 0 Then
KeyPress "N", 1
ElseIf x19 > 0 and y19> 0 Then
KeyPress "Enter", 1
ElseIf x20 > 0 and y20 > 0 Then
KeyPress "Enter", 1
ElseIf x21 > 0 and y21> 0 Then
KeyPress "Enter", 1
End If
KeyDown 18, 1
KeyPress 82, 1
KeyUp 18, 1
Delay ys
GetColor1=GetPixelColor(33,190)
Loop

5#

如果嫌找图慢就改用多点找色吧,后台用361后台插件或者大漠之类的是可行的.

承接各类脚本 联系QQ: 9940 0460


PC,安卓,模拟器,脚本定制!
6#

楼主私信已满,回不了的
帐号就是QQ号 ,微信同Q

直接发论坛就很好

7#

Do Until getcolor1 = "000000"
FindPic 400, 350, 650, 500, "Attachment:\pysw.bmp", 0.9, x17, y17
FindPic 400, 350, 650, 500,"Attachment:\yf.bmp", 0.9, x18, y18
FindPic 250, 350, 650, 500, "Attachment:\chucuo.bmp", 0.9, x19, y19
FindPic 400, 300, 650, 500, "Attachment:\chaoshi.bmp", 0.9, x20, y20
FindPic 250, 350, 650, 500, "Attachment:\wzcw.bmp", 0.9, x21, y21
If x17 > 0 and y17> 0 Then
KeyPress "Enter", 1
ElseIf x18 > 0 and y18 > 0 Then
KeyPress "N", 1
ElseIf x19 > 0 and y19> 0 Then
KeyPress "Enter", 1
ElseIf x20 > 0 and y20 > 0 Then
KeyPress "Enter", 1
ElseIf x21 > 0 and y21> 0 Then
KeyPress "Enter", 1
End If
KeyDown 18, 1
KeyPress 82, 1
KeyUp 18, 1
Delay ys
GetColor1=GetPixelColor(33,190)
Loop

8#

回复 2楼157800148的帖子

Do //循环找图标点击
FindPic 89,2178,168,2219, "Attachment:sq.png","000000",1, 0.1, intX, intY
If intX > -1 Then
Tap intX, intY
Exit Do
End If
Loop
觉得慢了60-100多的延迟

9#

相似度是0.9,我是试速度才调的0.1,,

发新话题 回复该主题