节点参考
视觉动作与识别字段
说明文字、图片、颜色识别,等待视觉、判断视觉、滚动到视觉及识别结果变量绑定。
视觉动作的适用场景
视觉动作适合目标位置随设备、分辨率、主题或页面内容变化的场景。它比固定坐标更稳定,但需要合适的识别区域、阈值和超时。
- ClickText:识别文字并点击,字段为 condition: TextExists、elementRef、outputs。
- ClickImage:匹配图片模板并点击,字段为 condition: TemplateMatch、elementRef、outputs。
- ClickColor:识别指定点或区域颜色并点击,字段为 condition: ColorAt、elementRef、outputs。
- WaitForVision:等待视觉条件出现或满足,字段为 condition、timeoutMillis、outputs。
- CheckVision:只做一次视觉校验并写入结果,字段为 condition、outputs。
- ScrollUntilVision:边滚动边查找视觉目标,字段为 condition、maxScrolls、direction、swipeDuration、intervalMs、earlyEndOnNoChange、outputs。
VisionCondition 字段说明
视觉条件包括颜色、区域颜色、文字存在和模板匹配。AI 生成视觉动作时,应尽量缩小识别区域并给出阈值和超时建议。
- ColorAt:判断指定点颜色。常用字段:x/y、xPct/yPct、color、colorVarKey、tolerance、sampleRadius、sampleMode、hitThreshold、similarity、preprocess。
- ColorRegion:判断区域颜色。常用字段:left/top/right/bottom、百分比区域、color、matchMode、tolerance、sampleStep、hitRatio、requireAverageMatch、earlyAccept、earlyReject。
- TextExists:判断文字是否存在。常用字段:text、textVarKey、regex、caseSensitive、minConfidence、区域坐标、preprocess。
- TemplateMatch:图片模板匹配。常用字段:templateBase64、templateVarKey、threshold、method、scaleMode、maxResults、suppressRadius、区域坐标。
识别结果写入变量
VisionResultBindings 可以把识别结果保存给后续动作使用。例如先识别按钮中心点,再用 Tap 的 pointVarKey 点击。
- matchedVar:是否命中。
- hitCountVar:命中数量。
- scoreVar / scoresVar:最佳得分或全部得分。
- pointVar / pointsVar:最佳点或全部点,适合后续 Tap、Swipe 使用。
- boxVar / boxesVar:识别框信息。
- textVar / textsVar / allTextVar:识别文字结果。
- numberVar / numbersVar:提取数字结果。
- messageVar:识别提示或错误信息。