!7 static OCRRecognizeAndTeach ocr; p-subst-autorestart { doIt(); showButton("Again", r-thread { doIt() }); } svoid doIt { cleanUp(ocr); ocr = null; print("Shooting"); img = shootScreenHidingConsole(); print("Recognizing"); ocr = new OCRRecognizeAndTeach(img); }