sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #54158
Re: [Question #688883]: onAppear handler will be called again
Question #688883 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688883
Status: Needs information => Answered
RaiMan proposed the following answer:
onXXX events are registered per Region (the screen object SCREEN in your
case - the main screen).
When using observe(), ALL registered events are activitated, which are
in your case.
You already tried to deactivate the first onAppear, but it is done in
the handler, which is too late (observe already running) and the
deactivation would not run anyways, since you did not store the name
returned by onAppear().
What I do not understand:
Why don't you juste use the normal wait()?
In your case using observe(someTime) is nothing else than simply waiting
for image1/image2 to appear:
if exists("image1", FOREVER):
#do something
if exists("image2", FOREVER):
#do something else
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.