Becuz it is a jpython code, we can use it in Sikuli.
from time import strftime, gmtime from java.awt import Toolkit from java.awt import Robot from java.awt import Rectangle from javax.imageio import ImageIO from java.io import File tk = Toolkit.getDefaultToolkit() ss = tk.getScreenSize() rbt = Robot() wait(2) bimage = rbt.createScreenCapture(Rectangle(ss)) setTime = strftime("%Y_%m_%d_%H_%M_%S", time.localtime()) ImageIO.write(bimage, "png", File("C:\screenshot_"+ setTime +".png"))