public String saveScreenCapture(String path) { return getScreen().capture(this).save(path); }
public String saveScreenCapture() { return getScreen().capture(this).save(); }
public String saveScreenCapture(String path, String name) { return getScreen().capture(this).save(path, name); }
SubFindRun[] theSubs = new SubFindRun[pList.size()]; int nobj = 0; ScreenImage base = getScreen().capture(this); for (Object obj : pList) { mArray[nobj] = null;
public void prompt(String msg) { scr_img_original = scrOCP.capture(); scr_img = scr_img_original.getImage(); scr_img_darker = scr_img;
while (observing && stop_t > (new Date()).getTime()) { long before_find = (new Date()).getTime(); ScreenImage simg = getScreen().capture(x, y, w, h); if (!regionObserver.update(simg)) { observing = false;
/** * VERY EXPERIMENTAL: returns a list of matches, that represent single words, that have been found in this region<br> * the match's x,y,w,h the region of the word<br> Match.getText() returns the word (utf8) at this match<br> * Match.getScore() returns a value between 0 ... 1, that represents some OCR-confidence value<br > (the higher, the * better the OCR engine thinks the result is) * * @return a list of matches */ public List<Match> listText() { if (Settings.OcrTextRead) { ScreenImage simg = getScreen().capture(x, y, w, h); TextRecognizer tr = TextRecognizer.getInstance(); if (tr == null) { Debug.error("text: text recognition is now switched off"); return null; } log(lvl, "listText: scanning %s", this); return tr.listText(simg, this); } Debug.error("text: text recognition is currently switched off"); return null; } //</editor-fold>
/** * STILL EXPERIMENTAL: tries to read the text in this region<br> might contain misread characters, NL characters and * other stuff, when interpreting contained grafics as text<br> * Best results: one line of text with no grafics in the line * * @return the text read (utf8 encoded) */ public String text() { if (Settings.OcrTextRead) { ScreenImage simg = getScreen().capture(x, y, w, h); TextRecognizer tr = TextRecognizer.getInstance(); if (tr == null) { Debug.error("text: text recognition is now switched off"); return "--- no text ---"; } String textRead = tr.recognize(simg); log(lvl, "text: #(" + textRead + ")#"); return textRead; } Debug.error("text: text recognition is currently switched off"); return "--- no text ---"; }
if (TextRecognizer.getInstance() != null) { log(lvl, "findInImage: Switching to TextSearch"); finder = new Finder(getScreen().capture(x, y, w, h), this); finder.findText((String) target);
boolean findingText = false; Finder f; ScreenImage simg = getScreen().capture(x, y, w, h); if (repeating != null && repeating._finder != null) { f = repeating._finder;
private static boolean doTestSetup(String testSetupSource, boolean silent) { Region r = Region.create(0, 0, 100, 100); Image img = new Image(r.getScreen().capture(r).getImage()); Pattern p = new Pattern(img); Finder f = new Finder(img);
private Finder doCheckLastSeenAndCreateFinder(ScreenImage base, Image img, double findTimeout, Pattern ptn) { if (base == null) { base = getScreen().capture(this);