361插件和大漠插件颜色相似度解析~~

/*
361 颜色相似度测试
*/
If Plugin.Sys.GetOSType >= 4 Then 
cls2 = "MSPaintView"
Else 
cls2 = "AfxFrameOrView42u"
End If 
Hwnd = Plugin.Window.Find("MSPaintApp", 0) 
Hwnd2 = Plugin.Window.FindEx(Hwnd, 0, cls2, 0)
h = Plugin.Window.FindEx(Hwnd2, 0, 0, 0)
x = 50
y = 50

//绑定窗口
Set dm = createobject("dm.dmsoft")
Delay 50
dm_ret = dm.BindWindow(h, "normal", "normal","normal",0)
Delay 1500
TracePrint dm.getColor(x,y)
TracePrint dm.cmpColor(x,y,"66ffff-000000",0.79)

//sim = Plugin.BGCP2_02.CmpColor(h, x, y, &HD6F670, 10)
//TracePrint i&":"&sim

由上面的输出结果可以判定:

设361的颜色相似度为 x, 大漠的颜色相似度为y,则换算关系为:

x/255 = 1-y

注意,361的颜色相似度取值范围是0~255,十进制。

posted @ 2013-11-13 15:21  前端小小菜  阅读(2938)  评论(0编辑  收藏  举报