[按键精灵] 纯文本查看 复制代码
//下面这句在屏幕区域范围内查找多点颜色,返回左上角第一点颜色位置坐标
XY = Plugin.Color.FindMutiColor(0, 0, 1024, 768, "FFFFFF", "2|0|FFFFFF,-6|1|FFFFFF,-3|1|FFFFFF,-6|3|FFFFFF,-3|3|FFFFFF,0|3|FFFFFF,4|3|FFFFFF,-1|5|FFFFFF,3|5|FFFFFF,-3|6|FFFFFF,-6|7|FFFFFF,1|8|FFFFFF,4|8|FFFFFF,-5|10|FFFFFF,-3|10|FFFFFF,4|10|FFFFFF", 1)
//下面这句用于分割字符串
ZB = InStr(XY, "|")
//下面这句将字符串转换成数值
X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB))
msgbox "屏幕多点找色功能:找屏幕""我""字位置位:" & X&","&Y