按键精灵的找图找色命令 | 信义之树

按键精灵的找图找色命令

2018年02月21日 星期三 22:41:08 按键精灵 6,748 次 0

一、得到指定点颜色(GetPixelColor)

GetColor=GetPixelColor(8,26)
If GetColor = "3936FF" Then 
    MoveTo 8, 26
End If

二、区域找色

FindColor 0,0,1440,900,"3936FF",intX,intY
If intX >= 0 and intY >= 0 Then 
	MessageBox "找到"
	TracePrint intX&","&intY
End If

三、模糊找色

FindColorEx 0,0,100,100,"3936FF",0,0.9,intX,intY
If intX >= 0 and intY >= 0 Then 
	MessageBox "找到"
	TracePrint intX&","&intY
End If

四、中心找色

FindCenterColor 0,0,100,100,"3936FF",intX,intY
If intX >= 0 and intY >= 0 Then 
	MessageBox "找到"
	TracePrint intX&","&intY
End If

五、区域找图

FindPic 4, 316, 84, 412, "attachment:\回收站.bmp", 0.9, intX, intY
If intX >= 0 and intY >= 0 Then 
    MessageBox "找到"
    MoveTo intX, intY
    LeftDoubleClick  1
    TracePrint intX & "," & intY	
End If