/// <summary> /// 找到某字符串后返回相同行ocr的字符串 /// </summary> /// <param name="dm"></param> /// <param name="x1"></param> /// <param name="y1"></param> /// <param name="x2"></param> /// <param name="y2"></param> /// <param name="str"></param> /// <param name="color"></param> /// <param name="w"></param> /// <param name="h"></param> /// <param name="ocrColor"></param> /// <param name="sim"></param> /// <returns></returns> public static string FindStr_Ocr(this DmPlugin dm, int x1, int y1, int x2, int y2, string str, string color, int w, int h, string ocrColor, double sim = 1.0) { int intX, intY; int ret = dm.FindStr(x1, y1, x2, y2, str, color, sim, out intX, out intY); if (intX >= 0 && intY >= 0) { return(dm.OCR(intX, intY - 5, intX + w, intY + h, ocrColor, 0.9)); } else { Logger.Debug("未找到字:" + str); return(""); } }