首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

[sikuli]-统制你的sikuli脚本以及行为

2012-06-29 
[sikuli]-控制你的sikuli脚本以及行为?setShowActions(False | True)If set to?True, when a script is ru

[sikuli]-控制你的sikuli脚本以及行为

?

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.exit([value])

Stops the script gracefully at this point. The value is returned to the calling environment.

Settings

New in version X1.0-rc2.

Settings.ActionLogsSettings.InfoLogsSettings.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?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:

= .# save default/actual value# implicitly wait 0.5 seconds before click.= 3# give app 3 seconds time before clicking again.= # reset to original value
Settings.DelayAfterDragSettings.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?

# you may wish to save the actual settings before.= 1.= 1.= 3# time for complete dragDrop: about 5 seconds + search times
Settings.SlowMotionDelay

Control the duration of the visual effect (seconds).

Settings.WaitScanRateSettings.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?

def myHandlerprint "it happened"# you may wish to save the actual settings before.= 0.2= 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.

?