Question #697732 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697732

RaiMan proposed the following answer:
Ok, got it.

There is another option value:
Settings.RepeatWaitTime = 0 (set globally for all regions)
or
someRegion.setRepeatWaitTime(0)

... the default is 1

So an
event.repeat()
leads exactly to 1 observe per second.

my test:
Settings.RepeatWaitTime = 0
Settings.ObserveScanRate = 50;

reg = Region(238,166,361,308)
img = "img.png" # 167x230
pimg = Pattern(img).exact()

reg.find(pimg).highlight(2)

def handler(evt):
    global count
    count += 1
    evt.repeat(0)

count = 0
running = 5.0
reg.onAppear(pimg, handler)
reg.observeInBackground()
wait(running)
print count/running

gives 33 observes per second.

All the best.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to