!752 static int grabWidth = 500, grabHeight = 300; p { forwardClicks(func(Point from, Point to, int btn) { //print("yo " + from + " " + to); Rect r = intersectWithScreen(rectAround(new Pt(from), grabWidth, grabHeight)); BWImage img = shootScreenBW(r); L rects = autoSegment(img, 3); print("Grabbing " + r + ", got " + n(l(rects), "rect")); Rect found = firstRectContaining(rects, from.x-r.x, from.y-r.y); if (found != null) { BWImage result = img.clip(found.getRectangle()); quickShowZoomedImage(result.getBufferedImage()); } else print("Nope"); false; // don't forward click }); }