!7 static OCRRecognizeAndTeach ocr; p-subst-autorestart { doIt(); showButton("Again", r-thread { doIt() }); } svoid doIt { cleanUp(ocr); ocr = null; print("Shooting & inverting"); BufferedImage img = shootScreenHidingConsole(); invertImage(img); saveJPG(img, getProgramFile("inverted.jpg")); ocr = new OCRRecognizeAndTeach(img); }