按键精灵速度最快的全屏找图返回图片个数脚本
认真修改了下之前的代码多了3行就是不一样从7秒提速到0.375秒~
cy=10 '图片高度
Dim ay, bx, by, sTime, qw, op
dw=Plugin.Sys.GetScRX
dh=Plugin.Sys.GetScRY
ax=0:ay = 0:sTime = Timer:bbs = 0
Do
FindPic ax, ay, dw, dh, "Attachment:\我.bmp", 1, intX2, intY2
If intX2 > 0 and intY2 > 0 Then
bbs=bbs+1:Ux=intX2+1:ay = inty2 + 1
qw=qw&intX2&","&intY2&vbcrlf
Else
Exit Do
End If
intX1=1
Do Until intX1 < 0
FindPic Ux, ay-1, dw, ay-1+cy, "Attachment:\我.bmp", 1, intX1, intY1
If intX1 > 0 and intY1 > 0 Then
bbs=bbs+1:Ux=intX1+1
qw = qw & intX1 & "," & intY1 & vbcrlf
End If
Loop
Loop
MessageBox "查找到符合条件的图片"& bbs &"张!"&vbcrlf&" "&vbcrlf&"耗时"& Timer-sTime &"秒"&vbcrlf&" "&vbcrlf&"他们的坐标为:"&vbcrlf&qw