← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #195342]: Optimal way to scan constantly in main loop

 

Question #195342 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/195342

    Status: Open => Answered

RaiMan proposed the following answer:
--- Settings.ObserveScanRate 
is only for the observer feature. for normal find operations like used with exists() it is the Settings.WaitScanRate

So if you use this, your solution will work as expected.

But it looks a little weird. this is clearer:

while True:
    wait(1)
    # search once every five seconds
    while not TestEpisodeRegion.exists("nextepisode.png", 0):
        wait(5)
    print("i see you")

This might need some adaption in your concrete situation.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.