static bool shootScreen_useScrot; // Use program "scrot" to make screenshots (on Linux) static BufferedImage shootScreen2() { ret shootScreen2(screenRectangle()); } static BufferedImage shootScreen2(Rectangle area) ctex { if (shootScreen_useScrot) { File f = prepareProgramFile(randomID(12) + ".png"); try { S cmd = "scrot " + bashQuote(f); S out = backtick(cmd); if (f.exists()) ret loadPNG(f); } catch e { print(e); shootScreen_useScrot = false; } finally { f.delete(); } } return new Robot().createScreenCapture(area); } static BufferedImage shootScreen2(Rect area) { ret shootScreen2(area.getRectangle()); } static BufferedImage shootScreen2(int x, int y, int w, int h) { ret shootScreen2(new Rectangle(x, y, w, h)); }