0

Screenshot mit Groovy

Posted by admin on April 22, 2011 in Groovy, Programming |

Das Beispiel funktioniert mit ein paar Try-Catch-Blöcken auch mit Java. // Snippet for Groovy-Screenshot import java.awt.*; import java.awt.image.*; import javax.imageio.ImageIO; Robot robot = new Robot(); // Get the size of the default screen Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); int width = (int)dim.getWidth(); int height = (int)dim.getHeight(); // Creates a BufferedImage BufferedImage img = robot.createScreenCapture(new Rectangle(0, 0, [...]

Tags: ,

Copyright © 2010-2024 Analysisfreaks.de All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.0.4, from BuyNowShop.com.

Developed by Hardik