(self)
| 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): |
nothing calls this directly
no test coverage detected