函数:findColorUntil 单点循环比色
函数名称:单点循环比色
函数分类:v1.2.8 及其以上版本 TSLib(内置,无需下载)
函数功能:单点循环比色
函数方法
bool = findColorUntil(x,y,color,bool,dim,ms,timeout)
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| x | number | 是 | — | 基准点横坐标 |
| y | number | 是 | — | 基准点纵坐标 |
| color | number | 是 | — | 基准点颜色值 |
| bool | boolean | 是 | true | 是否匹配颜色,true - 匹配,false - 不匹配 |
| dim | number | 是 | 90 | 找色精度:0~100 |
| ms | number | 否 | 100 | 找色频率,单位:毫秒 |
| timeout | number | 否 | 60 | 超时时间,单位:秒 |
| 返回值 | 类型 | 说明 |
|---|---|---|
| bool | boolean | true - 存在;false - 不存在 |
函数用例
require("TSLib")
bool = findColorUntil(44,166,0xfce6a8,true,90,405,1)
if bool then
dialog("找到")
else
dialog("未找到")
end
注意事项
- 点击查看使用方法及下载函数库