← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #220752]: can not find pattern - how to NOT quit

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
the most probable reason:
the image in Win7 is slightly different from that in WinXP

since you are using similar(0.4) in the onAppear() it might find a false
positive and go to the handler, where it falls (with the standard
similarity).

observe() does not throw FindFailed exceptions, so the problem must be
in the handler, which can only be triggered if something appears.

BTW: the observe() in the handlers are useless (or even dangerous
depending on how they are implemented: possible memory leak), since the
observe() runs in the background forever anyway and is not stopped by
the handler.

.. and the wait(10) are not needed as well, since the observe() only
scans every 30 secs.

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