← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #675373]: [HowTo] make a simple loop with "exists image" and "click image"? (Sikuli)

 

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

    Status: Answered => Open

David Borghi is still having a problem:
Hello, RaiMan.

Thank you again for your fast response.

What I was expecting:

when I see image 1
then I wait for image 1.1 or 1.2
If I see image 1.1 click on image 1.1.1
If I see image 1.2 click on image 1.2.1
then I wait 10 seconds

For now, I was able to put both scripts to work in a single script.

The problem is, one script can be executed only If the other was
previously executed.

Translating, If script 1 was executed, It'll be possible to execute it
again only if script 2 was executed as well.

So, it's happening in this way:

script 1
script 2
script 1
script 2

How the workflow was written:

while exists("1540053824433-3.png", FOREVER):  
      exists("1540099469526.png", FOREVER)
      doubleClick("1540102517023.png")
      wait (10)
      exists("1540053824433-3.png", FOREVER)
      exists("1540069005561.png", FOREVER)
      doubleClick("1540102829602.png")
      wait (10)

Would it be necessary to "separate" both scripts to avoid the "rule" of
script 1/2/1/2?

I'm sorry If I was not clear enough, If possible, please, let me know If
I can describe in a better way.

Thank you for all your help and your attention.
I'm sorry for all the inconvenience.

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