sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #01426
Re: [Question #146227]: How to make script with sikuli that waits 1 button
Question #146227 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/146227
Status: Open => Answered
RaiMan proposed the following answer:
Hope it helps
ebTitle = "EpicBot"
ebApp = App(ebTitle)
if not App(ebTitle).window():
print "ebApp not running"
exit(1)
ebApp.focus()
wait(1)
# now we have the frontmost ebApp window visible
# is Ex Button in that window???
# if not: what makes it come into existence?
# to make it clearer I use 3 blanks for one indentation level (tabs are
not working here :-(
while True:
if not exists(Ex button):
wait(1)
continue # we loop until Ex button exists
# here we come when Ex Button is there
click(Rt)
click(Ex)
click(Ty)
# do you have to wait here longer than 3 seconds?
if exists(Py image):
break # we leave the loop
# we loop again
# Py image was found
print "Py image" was found"
# the script terminates
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.