MCPcopy
hub / github.com/cluic/wxauto / OCR

Method OCR

wxauto/elements.py:428–439  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

426 self.api.SwitchToThisWindow()
427
428 def OCR(self):
429 result = ''
430 ctrls = self.PhotoBox.GetChildren()
431 if len(ctrls) == 2:
432 self.t_ocr.Click(simulateMove=False)
433 ctrls = self.PhotoBox.GetChildren()
434 if len(ctrls) != 3:
435 Warnings.lightred('获取文字识别失败', stacklevel=2)
436 else:
437 TranslateControl = ctrls[-1]
438 result = TranslateControl.TextControl().Name
439 return result
440
441
442 def Save(self, savepath='', timeout=10):

Callers

nothing calls this directly

Calls 4

ClickMethod · 0.80
TextControlMethod · 0.80
GetChildrenMethod · 0.45
lightredMethod · 0.45

Tested by

no test coverage detected