sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03877
Re: [Question #164161]: [How to] Capture screenshot using java code
Question #164161 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/164161
Status: Open => Solved
Calle Rundgren confirmed that the question is solved:
Realized there could be a problem to get a clear view of the code. Here
it is without any comments and other text.
Capture screenshots with sikuli:
from java.awt import *
from java.io import File
from javax.imageio import ImageIO
robot = Robot()
theImage = robot.createScreenCapture(Rectangle(Toolkit.getDefaultToolkit().getScreenSize()))
ImageIO.write(theImage, "png", File(r"C:\myPic.png"))
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.