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. ORA-00911: invalid character 错误解决

    多数情况如下: 控制面板--系统和安全---系统--高级系统设置--高级--环境变量--系统变量中 变量名:NLS_LANG 变量值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK ...

  2. Rsync+sersync部署

    内核版本:2.6.32-431.el6.x86_64 系统采用最小化安装,系统经过了基本优化,selinux 为关闭状态,iptables 为无限制模式 源码包存放位置:/root Rsync 客户端 ...

  3. C# List<object> 按特定字段排序

    using System; using System.Collections; using System.Collections.Generic; using System.Linq; using S ...

  4. WAF防火墙学习

    正则解析神器 http://rick.measham.id.au/paste/explain.pl http://regexr.com/ http://regex101.com/ http://www ...

  5. python常用函数 U

    update(dict) 字典合并,生成的为新的字典,新字典操作不会影响老字典. 例子:

  6. struts2的相关知识(实现原理、拦截器)

    struts2的实现原理 客户端初始化一个指向Servlet容器(例如Tomcat)的请求 这个请求经过一系列的过滤器(Filter)(这些过滤器中有一个叫做ActionContextCleanUp的 ...

  7. Python---基础---水仙花数和三色球

    一.编写一个程序,求100~999之间的所有水仙花数 如果一个3位数等于其各位数字的立方和,则称这个数为水仙花数.例如:153 = 1^3 + 5^3 + 3^3,因此153就是一个水仙花数 for ...

  8. re模块的高级使用

    主要有四个方法: search : 从字符串的任意位置开始检索,首次匹配即结束 findall : 全部匹配 sub : 将正则匹配结果进行替换 split : 根据正则匹配结果将字符串进行切分,然后 ...

  9. python 全栈开发,Day45(html介绍和head标签,body标签中相关标签)

    一.html介绍 1.web标准 web准备介绍: w3c:万维网联盟组织,用来指定web标准的机构(组织) web标准:制作网页遵循的规范 web准备规范的分类:结构标准.表现标准.行为标准. 结构 ...

  10. 【Java】ApplicationContext应用上下文工具类

    @Slf4j @Service public class SpringContextHolder implements ApplicationContextAware, DisposableBean ...