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. open, creat - 用来 打开和创建 一个 文件或设备

    SYNOPSIS 总览 #includ e <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int o ...

  2. Spring Cloud Stream监听已存在的Queues/Exchanges

    环境准备 rabbitmq已运行,端口5672,控制台web端口15672,用户名密码guest/guest 引入spring cloud stream依赖 compile('org.springfr ...

  3. paste 合并文件

    1.命令功能 paste  用于合并文件的列,把每个文件以列对列的方式,一列列地加以合并. 2.语法格式 paste  option  file 参数选项 参数 参数说明 -d 指定间隔符合并文件(默 ...

  4. Sumdiv(约数和问题)

    题目地址 看到这题的题解,大佬都说是小学奥数,蔡得我不敢鸡声. 求 \(a^b\) 所有的约数之和 mod \(9901\) \((1<=a,b<=5*10^7)\) 题解 做这道题,我还 ...

  5. 将ubuntu系统迁移到ssd固态

    朋友送了一个固态硬盘给我,因此将原机械硬盘上的系统迁移到固态硬盘上. 原机械硬盘(dev/sdb)装有win10和ubuntu双系统.分区情况如下: sda1:ESP分区 sda2:资料 sda3:资 ...

  6. super语句不必须放在方法第一行。

    class A(object): pass class B(A): def __init__(self): self.__a = "B#a" super(B, self).__in ...

  7. Test 6.29 T3 小学生

    问题描述 "不错,不错!那么,准备好迎接下一道题了么?"一道白光闪过,CJK 眼前出现了 1e100 个小学生."他们中,有一些人轨了我的机子.现在,我需要你在 1S 之 ...

  8. Influxdb根据配置文件启动(Influxdb的数据存储)

    1.在Influxdb文件夹下建立一个bat文件 2.文件内容如下: @echo offSETLOCAL :: 获取当前批处理所在路径SET InfluxdP==%~dp0 :: 开启influxdb ...

  9. php similar_text()函数 语法

    php similar_text()函数 语法 作用:计算两个字符串的相似度,并返回匹配字符的数目大理石平台厂家 语法:similar_text(string1,string2,percent) 参数 ...

  10. 晋江年下文爬取【xpath】

    ''' @Modify Time @Author 目标:晋江年下文 爬取6页 ------------ ------- http://www.jjwxc.net/search.php?kw=%C4%E ...