| 函数名称 | 找图.遍历找图 | |||
|---|---|---|---|---|
| 函数功能 | 图片查找获取要查找图片在所选区域中的所有坐标 | |||
| 函数语法 | 找图.遍历找图(FindPicAllPoint,implement,parameter,Sleep) | |||
| 英语语法 | ||||
| 参数说明 | 参数 | 类型 | 必填 | 说明 |
| FindPicAllPoint | table | 是 | 特征数组 | |
| implement | integer | 是/否 | 1. 执行功能编号 2. 根据功能需求写 |
|
| parameter | table integer string |
是/否 | 1. 执行功能参数1~8 2. 根据功能需求写 |
|
| Sleep | integer | 是/否 | 1. 执行功能后随机延迟 2. 单位毫秒 |
|
| 返回值 | 有 | arr |
1. 成功返回坐标表 2. 失败返回nil |
|
| #### 注意事项 |
| #### 编号 | #### 功能 | #### 语法 | #### 参数 | 类型 | 说明 | #### 功能返回值 |
|---|---|---|---|---|---|---|
| 无 | 查找特征 | 无 | 无 | 无 | 无 | 1. 成功返回2参数 2. 1返回true 3. 2返回个数 4. 失败返回false |
| 1 | 随机点击 | 无 | 无 | 1. 成功返回true 2. 失败返回false |
||
| 2 | 偏移点击 | {x,y} | x,y | integer | 需要偏移的x,y值 | 1. 成功返回true 2. 失败返回false |
| 3 | 移动特征 | {x,y,time} | x,y | integer | 终点坐标 | 1. 成功返回true 2. 失败返回false |
| 4 | 随机合成 | {x1,y1,x2,y2,time} | x1,y1 | integer | 起点坐标 | 1. 成功返回true 2. 失败返回false |
| x2,y2 | integer | 终点坐标 | ||||
| time | integer | 1. 完成时间 2. 单位毫秒 |
||||
| 返回坐标 | 无 | 无 | 无 | 无 | 1. 成功返回坐标表 2. 失败返回nil |
|
| #### 注意事项 | 特征语法格式必须规范 |
| #### 特征语法 | FindPicAllPoint={name,{x1, y1, x2, y2,pic_name,sim}} {x1, y1, x2, y2,pic_name,sim}:参考懒人函数【findPicAllPoint】参数表 |
||||
|---|---|---|---|---|---|
| 参数说明 | 参数 | 类型 | 必填 | 说明 | |
| name | string | 是 | 特征名称 | ||
| x1,y1 | integer | 是 | 区域左上角x,y坐标 | ||
| x2,y2 | integer | 是 | 区域右下角x,y坐标 | ||
| pic_name | string | 是 | 要找的图片名字:图片.png,多个图片用“ | ”号分隔 | |
| sim | number | 是 | 相似度,取值范围0-1 | ||
| 注意事项 | 特征语法格式必须规范 |
函数用例:
特征={"特征名",{0,0,0,0,"1.png|2.png|3.png",1.0}}---查找特征if 找图.遍历找图(特征) thenend
特征={"特征名",{0,0,0,0,"1.png|2.png|3.png",1.0}}---执行随机点击if 找图.遍历找图(特征,1,15,1000)thenend
特征={"特征名",{0,0,0,0,"1.png|2.png|3.png",1.0}---执行随机偏移点击if 找图.遍历找图(特征,2,{-5,10},1000) thenend
特征={"特征名",{0,0,0,0,"1.png|2.png|3.png",1.0}}---执行随机其他点击if 找图.遍历找图(特征,3,{200,333},15,1000) thenend
特征={"特征名",{0,0,0,0,"1.png|2.png|3.png",1.0}}---执行移动特征if 找图.遍历找图(特征,4,{200,333,200},1000) thenend
特征={"特征名",{0,0,0,0,"1.png|2.png|3.png",1.0}}local parameter=节找图.遍历找图(特征)if parameter thenprint(parameter)end
