sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27446
Re: [Question #252512]: How to use regions properly
Question #252512 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252512
Smizzy posted a new comment:
The script im working on is kinda long, like 200 lines, Ill just post
the relevant parts.
customerlist = ("buyitem-2.png","dungeonquester.png","questgiver.png")
if customer.exists(customerlist):
try:
customer.click(customerlist)
if selling.exists("buy.png"):
selling.click("buy.png")
continue
if selling.exists("thanks.png"):
selling.click("thanks.png")
continue
if selling.exists("ok.png"):
selling.click("ok-1.png")
continue
else:
selling.click("refuse.png")
continue
My issue is that buy.png only exists if the image found was buyitem-2.png,
thanks.png only exists if the image found was dungeonquester.png,
and ok.png only exists if the image found was questgiver.png
my script wastes a lot of time searching for buttons that arent there
because i cant differentiate between which image from the list was
found.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.