← Back to team overview

sikuli-driver team mailing list archive

[Question #268536]: image click on multiple appearances

 

New question #268536 on Sikuli:
https://answers.launchpad.net/sikuli/+question/268536

On the webpage that I'm trying to automate, there are three images in total that need to be clicked. First, an attack image. Second, a continue image. Third, a restart image. Sikuli should click the attack image, then move on to the continue image. Once the continue image is clicked, it needs to attack again. Here's a broken down, simplified order of what needs done.

Attack
Continue
Attack
Continue
Attack
Continue
Attack
Continue
Attack
Continue
Attack
Restart


Here is a sample script that I came up with to execute the above example. This, however, was quite slow. Each image click took approximately 1.5 seconds, which is extremely slow.
https://paste.ee/p/u6AiT


When I tried to modify the sample script to loop, it wouldn't work for me. It would only click one of the images, and then stop without error. Here is a sample script that I came up with to execute a looped script that should do the same as above.
https://paste.ee/p/aOEva


This brings me to my question, and goal. I'd like the script to click the AttackImage whenever it's on screen, and when it's not on screen, click the ContinueImage. When neither of those are on screen, it should click the RestartImage, which would restart the loop of the script to go back to AttackImage, then ContinueImage, etc.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.