sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37025
Re: [Question #287213]: Need help with OnAppear
Question #287213 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/287213
Status: Open => Answered
RaiMan proposed the following answer:
supposing that the extra indent line 2+ is a typo, then this is your
effective code:
regSplash = Region(472,331,739,400)
def notUsed(empty):
return
regSplash.onAppear("Ikernel\\UnitStartingUp.png", notUsed)
regSplash.observe(240)
... then on run it silently waits for max 4 Minutes for the image to appear and then terminates.
If it appears, your code does nothing, but terminating in that moment.
for this it is easier to use exists():
regSplash = Region(472,331,739,400)
if regSplash.exists("Ikernel\\UnitStartingUp.png", 240):
print "image appeared"
else:
print "image did not appear"
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.