Question #678325 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678325

Description changed to:
I'm trying to make something simple for a game macro. sometimes a button
randomly appears in intervals between 5 and 500 seconds. I want it to
detect and click the button within 10 seconds, but to not click if the
button doesn't exist. Yet if I try something like:

while has(randomButtonImage):
    click(randomButtonImage)

If the button isn't already up, the program closes saying findfailed. if
the button is up and I run the program, it goes to the button, clicks it
a few times(even after it has disappeared), and then when the button is
gone from being clicked the program terminates because it says
findfailed.

I'm confused because sikuli says it doesn't throw a findfailed for has()
in version 1.1.4.

All I want it to do is click the button once when it exists (and then
the button in the game goes away for 5-500 seconds), and then to keep
searching for the button until it comes up again (but not clicking
unless it exists, and to stop terminating if the image doesn't exist).

Thanks for any help.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to