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"))

  

Capture pictures using Jpython的更多相关文章

  1. 【转】[fix] Wireshark error: There are no interfaces on which a capture can be done. on Mac OS X

    I got the following error message when trying to open a network interface for capture using Wireshar ...

  2. Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ”

    Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ” 解决方法: 今天在电脑上安装了WIR ...

  3. HTML5属性--(capture="camera") 上传照片或者打开手机相机

    要获取手机相机拍照或者访问相册    这里贴一个相关链接:http://blog.csdn.net/jackfrued/article/details/8967667 JSP页面代码: <inp ...

  4. SPX Instant Screen Capture

    Today I will recommend a NICE screen capture tool, which name is SPA Instant Screen Capture. http:// ...

  5. 在webapp上使用input:file, 指定capture属性调用默许相机,摄像,录音功能

    ## 在webapp上使用input:file, 指定capture属性调用默认相机,摄像,录音功能 在iOS6下开发webapp,使用inputz之file,很有用 <input type=& ...

  6. <input type="file" id="camera" multiple="multiple" capture="camera" accept="image/*"> 上传图片,手机调用相册和摄像头

    <input type="file" id="camera" multiple="multiple" capture="ca ...

  7. DirectX.Capture Namespace

    DirectX.Capture Class Library   DirectX.Capture Namespace The DirectX.Capture namespace contains cla ...

  8. DirectX.Capture Class Library

    DirectX.Capture Class Library Brian Low,              29 Mar 2008                                    ...

  9. Capture

    1.导出Logical symbol 单个元件导出放入指定库:左键选中元件→右键“Edit Parts”→View“Package”→file“Save As”→找到要存放的库. 从某个已经设计好的原 ...

随机推荐

  1. Docker备份镜像

    docker save -o mycentos.tar mycentos_new:1.1 指定输出到的文件 执行后,运行 ls 命令即可看到打成的tar包, 因为有463M所以打包要一会

  2. linux查看 rsync 服务状态

    [root@rsync-server-1 /]# lsof -i tcp:873 COMMAND  PID USER  FD  TYPE DEVICE SIZE/OFF NODE NAME rsync ...

  3. linux创建相关待同步目录

    [root@rsync-server-1 ~]# mkdir /data/{web,web_data}/redhat.sx -p [root@rsync-server-1 ~]# tree /data ...

  4. Taro -- 微信小程序登录

    Taro微信小程序登录 1.调用Taro.login()获取登录凭证code: 2.调用Taro.request()将code传到服务器: 3.服务器端调用微信登录校验接口(appid+appsecr ...

  5. SpringBoot 利用freemaker生成静态页面

    1. <!-- freemarker模板 --> <dependency> <groupId>org.springframework.boot</groupI ...

  6. Task8.循环和递归神经网络

    RNN提出的背景: RNN通过每层之间节点的连接结构来记忆之前的信息,并利用这些信息来影响后面节点的输出.RNN可充分挖掘序列数据中的时序信息以及语义信息,这种在处理时序数据时比全连接神经网络和CNN ...

  7. securityDemopom

    <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> &l ...

  8. CUDA Error

    第一个问题:CUDA Error: out of memory darknet: ./src/cuda.c:36: check_error: Assertion `0' failed. 已放弃 (核心 ...

  9. Django ormmodel模型字段参考文章

    Model 字段参考 (Model field reference)¶ 本文档包含所有 字段选项 (field options) 的内部细节和 Django 已经提供的 field types . 参 ...

  10. 20180820-Java 抽象类

    Java 抽象类 在面向对象的概念中,所有的对象都是通过类来描绘的,但是反过来,并不是所有的类都是用来描绘对象的,如果一个类中没有包含足够的信息来描绘一个具体的对象,这样的类就是抽象类. 抽象类除了不 ...