节点参考

视觉动作与识别字段

说明文字、图片、颜色识别,等待视觉、判断视觉、滚动到视觉及识别结果变量绑定。

当前:视觉动作与识别字段
节点参考

视觉动作与识别字段

说明文字、图片、颜色识别,等待视觉、判断视觉、滚动到视觉及识别结果变量绑定。

视觉动作的适用场景

视觉动作适合目标位置随设备、分辨率、主题或页面内容变化的场景。它比固定坐标更稳定,但需要合适的识别区域、阈值和超时。

  • ClickText — 识别文字并点击,字段为 condition: TextExistselementRefoutputs
  • ClickImage — 匹配图片模板并点击,字段为 condition: TemplateMatchelementRefoutputs
  • ClickColor — 识别指定点或区域颜色并点击,字段为 condition: ColorAtelementRefoutputs
  • WaitForVision — 等待视觉条件出现或满足,字段为 conditiontimeoutMillisoutputs
  • CheckVision — 只做一次视觉校验并写入结果,字段为 conditionoutputs
  • ScrollUntilVision — 边滚动边查找视觉目标,字段为 conditionmaxScrollsdirectionswipeDurationintervalMsearlyEndOnNoChangeoutputs

VisionCondition 字段说明

视觉条件包括颜色、区域颜色、文字存在和模板匹配。AI 生成视觉动作时,应尽量缩小识别区域并给出阈值和超时建议。

  • ColorAt — 判断指定点颜色。常用字段:x/yxPct/yPctcolorcolorVarKeytolerancesampleRadiussampleModehitThresholdsimilaritypreprocess
  • ColorRegion — 判断区域颜色。常用字段:left/top/right/bottom、百分比区域、colormatchModetolerancesampleStephitRatiorequireAverageMatchearlyAcceptearlyReject
  • TextExists — 判断文字是否存在。常用字段:texttextVarKeyregexcaseSensitiveminConfidence、区域坐标、preprocess
  • TemplateMatch — 图片模板匹配。常用字段:templateBase64templateVarKeythresholdmethodscaleModemaxResultssuppressRadius、区域坐标。

识别结果写入变量

VisionResultBindings 可以把识别结果保存给后续动作使用。例如先识别按钮中心点,再用 TappointVarKey 点击。

  • matchedVar — 是否命中。
  • hitCountVar — 命中数量。
  • scoreVar / scoresVar — 最佳得分或全部得分。
  • pointVar / pointsVar — 最佳点或全部点,适合后续 TapSwipe 使用。
  • boxVar / boxesVar — 识别框信息。
  • textVar / textsVar / allTextVar — 识别文字结果。
  • numberVar / numbersVar — 提取数字结果。
  • messageVar — 识别提示或错误信息。