sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #04984
Re: [Question #169767]: IF image appears FIRST in 1 of the 2 regions
Question #169767 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/169767
Status: Open => Answered
RaiMan proposed the following answer:
this should work (made some corrections):
regA = False
while True:
if regA.exists("imgA.png"):
regA = True
break
if regB.exists("imgB.png"):
break
wait(5)
if regA:
wait(10) # sleep is deprecated and needs a time in seconds
else:
if regC.exists("imgB.png"):
click(regC.getLastMatch()) # to avoid another find operation
else:
click("imgC.png")
waitVanish("someImg.png", a_time_in_seconds )
I used "imgX.png", because this is how it is shown in the Python code.
In the IDE these strings are represented by the image thumbnails.
I suppose, that regA, regB and Regc are defined properly.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.