setShowActions(False | True)
If set to True, when a script is run, Sikuli shows a visual effect (a blinking double lined red circle) on the spot where the action will take place before executing actions (e.g.click(), dragDrop(), type(), etc) for about 2 seconds in the standard (see Settings.SlowMotionDelay ). The default setting is False.
exit([value])
Stops the script gracefully at this point. The value is returned to the calling environment.
class Settings
New in version X1.0-rc2.
Settings.ActionLogs
Settings.InfoLogs
Settings.DebugLogs
Either option might be switched on (True) or off (False), to show or hide the respective message type in the IDE console or on command line ([log], [info], [debug]).
Settings.MinSimilarity
The default minimum similiarty of find operations. While using a Region.find() operation, if only an image file is provided, Sikuli searches the region using a default minimum similarity of 0.7.
Settings.MoveMouseDelay
Control the time taken for mouse movement to a target location by setting this value to a decimal value (default 0.5). The unit is seconds. Setting it to 0 will switch off any animation (the mouse will “jump” to the target location).
As a standard behavior the time to move the mouse pointer from the current location to the target location given by mouse actions is 0.5 seconds. During this time, the mouse pointer is moved continuosly with decreasing speed to the target point. An additional benefit of this behavior is, that it gives the active application some time to react on the previous mouse action, since the e.g. click is simulated at the end of the mouse movement:
mmd = Settings.MoveMouseDelay # save default/actual value
click(image1) # implicitly wait 0.5 seconds before click
Settings.MoveMouseDelay = 3
click(image2) # give app 3 seconds time before clicking again
Settings.MoveMouseDelay = mmd # reset to original value
Settings.DelayAfterDrag
Settings.DelayBeforeDrop
DelayAfterDrag specifies the waiting time after mouse down at the source location as a decimal value (seconds).
DelayBeforeDrop specifies the waiting time before mouse up at the target location as a decimal value (seconds).
Usage: When using Region.dragDrop() you may have situations, where the operation is not processed as expected. This may be due to the fact, that the Sikuli actions are too fast for the target application to react properly. With these settings the waiting time after the mouse down at the source location and before the mouse up at the target location of a dragDrop operation are controlled. The standard settings are 0.3 seconds for each value. The time that is taken, to move the mouse from source to target is controlled by Settings.MoveMouseDelay:
# you may wish to save the actual settings before
Settings.DelayAfterDrag = 1
Settings.DelayBeforeDrop = 1
Settings.MoveMouseDelay = 3
dragDrop(source_image, target_image)
# time for complete dragDrop: about 5 seconds + search times
Settings.SlowMotionDelay
Control the duration of the visual effect (seconds).
Settings.WaitScanRate
Settings.ObserveScanRate
Specify the number of times actual search operations are performed per second while waiting for a pattern to appear or vanish.
As a standard behavior Sikuli internally processes about 3 search operations per second, when processing a Region.wait(), Region.exists(), Region.waitVanish(),Region.observe()). In cases where this leads to an excessive usage of system ressources or if you intentionally want to look for the visual object not so often, you may set the respective values to what you need. Since the value is used as a rate per second, specifying values between 1 and near zero, leads to scans every x seconds (e.g. specifying 0.5 will lead to scans every 2 seconds):
def myHandler(e):
print "it happened"
# you may wish to save the actual settings before
Settings.ObserveScanRate = 0.2
onAppear(some_image, myHandler)
observe(FOREVER, background = True)
# the observer will look every 5 seconds
# since your script does not wait here, you
# might want to stop the observing later on ;-)
New in version X1.0-rc2.
Settings.ObserveMinChangedPixels
The minimum size in pixels of a change to trigger a change event when using Region.onChange() without specifying this value. The default value is 50.
分享到:
相关推荐
MIT的研究人员设计了一种新颖的图形脚本语言Sikuli,计算机用户只须有最基本的编程技能(比如会写print"hello world"),他不需要去写出一行行代码,而是用屏幕截图的方式,用截出来的图形元素组合出神奇的程序。...
Sikuli是基于图形的脚本语言,本资源包含最新版1.1.2的sikuli安装包及相关依赖包,下载点击runsikulix.cmd可一键启动,无需联网下载安装。 新版的1.1.2版本亲测可支持jdk1.8.
金蝶Wise版K3-生产领料-保存-整理后脚本脚本,金蝶SQL脚本语句,亲测可用|金蝶Wise版后台脚本K3-生产领料-保存-整理后脚本,金蝶SQL脚本语句,亲测可用;
nacos-2.0.1 postgresql初始化脚本
CMORPH-BLD 批量处理CDO脚本,用于windows下批处理CMORPH二进制文件。具体使用方法见CMORPH处理博客。
编写的shell 脚本、perl 脚本、python 脚本 等如果不想被别人看到原文件,可以使用该工具shc ,对脚本文件加密,
MIT的研究人员设计了一种新颖的图形脚本语言Sikuli,计算机用户只须有最基本的编程技能(比如会写print"hello world"),他不需要去写出一行行代码,而是用屏幕截图的方式,用截出来的图形元素组合出神奇的程序。
CVE-2017-12615利用脚本;tomcat服务器PUT上传导致命令执行。
BAT批处理脚本-WinXP相关批处理-12个 BAT批处理脚本-加密解密-22个 BAT批处理脚本-实用的批处理文件-70个 BAT批处理脚本-提示窗口进度条-17个 BAT批处理脚本-数值计算-23个 BAT批处理脚本-文件相关操作-92个 BAT...
我加入了IPv6自动解析脚本。到手直接用。非常适合家里有群晖NAS但是只有公网IPv6的家庭宽带。绝对是优秀的DDNS方案。 本脚本的工作流程是:对比云端解析记录-> 不存在则添加 -> 存在则更新。 脚本运行依赖:curl、...
Burp-suit工具以及启动脚本
【RMAN】RMAN脚本中使用替换变量--windows 下rman全备脚本【RMAN】RMAN脚本中使用替换变量--windows 下rman全备脚本【RMAN】RMAN脚本中使用替换变量--windows 下rman全备脚本
最好的Tcl中文教程,Tcl语言是目前测试仪表领域中最常用的脚本语言,其中文资料较少,此书是目前为止我看到的最好的Tcl中文教程,看完此书,可以轻松掌握Tcl语言的常见使用,值得下载。
kafka-eagle-2.0.3安装如果发现eagle不会自动建库建表是,可以下载该sql脚本,自己建库建表
wincc脚本数据手册,最全的C脚本,介绍详细,官方资料
BAT批处理脚本-WinXP相关批处理-12个 BAT批处理脚本-加密解密-22个 BAT批处理脚本-实用的批处理文件-70个 BAT批处理脚本-提示窗口进度条-17个 BAT批处理脚本-数值计算-23个 BAT批处理脚本-文件相关操作-92个 BAT...
BAT批处理脚本-WinXP相关批处理-12个 BAT批处理脚本-加密解密-22个 BAT批处理脚本-实用的批处理文件-70个 BAT批处理脚本-提示窗口进度条-17个 BAT批处理脚本-数值计算-23个 BAT批处理脚本-文件相关操作-92个 BAT...
BAT批处理脚本-WinXP相关批处理-12个 BAT批处理脚本-加密解密-22个 BAT批处理脚本-实用的批处理文件-70个 BAT批处理脚本-提示窗口进度条-17个 BAT批处理脚本-数值计算-23个 BAT批处理脚本-文件相关操作-92个 BAT...
BAT批处理脚本-WinXP相关批处理-12个 BAT批处理脚本-加密解密-22个 BAT批处理脚本-实用的批处理文件-70个 BAT批处理脚本-提示窗口进度条-17个 BAT批处理脚本-数值计算-23个 BAT批处理脚本-文件相关操作-92个 BAT...
带有sikuli-ide,chrome浏览器和vnc服务器的Docker映像,用于在运行docker容器内部开发sikuli脚本,以便在具有vnc远程访问的chrome浏览器中实现Web例程自动化。 工作流程: 使用本地文件夹安装到容器〜/ scripts...