def reset_text_recognizer(self): """Resets the text recognizer settings to default. Example: | Switch OCR To Numbers Only | # Sets the On screen Character Recognition To Numbers Only. | | Reset Text Recognizer | # Reset the text recognizer back to the alpha-numeric text recognition. | """ self._info("Setting the text recognition setting to the default settings.") TextRecognizer.reset() TextRecognizer.getInstance()
def reset_text_recognizer(self): """Resets the text recognizer settings to default. Example: | Switch OCR To Numbers Only | # Sets the On screen Character Recognition To Numbers Only. | | Reset Text Recognizer | # Reset the text recognizer back to the alpha-numeric text recognition. | """ self._info( "Setting the text recognition setting to the default settings.") TextRecognizer.reset() TextRecognizer.getInstance()
def startup(): if LOGIN_SCREEN_FULL.exists(LOGIN_SCREEN_FULL_IMG): pass elif WELCOME_SCREEN.exists(WELCOME_SCREEN_IMG): logout() wait_for_login_screen() else: raise BadError("Unrecognized Starting Condition") Settings.OcrTextRead = True Settings.OcrLanguage = "eng" # reset the TextRecognizer TR.reset() # instantiate it TR.getInstance() wl = string.ascii_letters + string.digits OCR.setParameter("tessedit_char_whitelist", wl)
import org.sikuli.script.TextRecognizer as TR Settings.OcrReadText = True Settings.OcrLanguage = "chi_sim" TR.reset() print selectRegion().text()