Need Help with my Script (For Summoners War)

Asked by Alex Miller

Hey Guys, maybe someone of you can help me to write my script to loop it over and over

while True:
    exists("1548420003690.png")
    click("1548420691558.png")
    time.sleep(10)
    click("1548420039656.png")
    time.sleep(15)
    exists("1548420088664.png")
    click("1548420099600.png")
    time.sleep(2)
    exists("1548420121113.png")
    click("1548420127354.png")

This is the Script, if i press Run, it only run the First and Second line and stop there and then the Script pop up again.
It would be great if someone gonna help me. :) (Sorry for my bad English btw :D)

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Miller
Solved:
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1

If you want to click image2 only when image1 is visible, you have to use "if exists(image1)".
There is a general usage of exists().
https://sikulix-2014.readthedocs.io/en/latest/scenarios.html?highlight=exists#sikulix-general-aspects-of-scripting

Revision history for this message
Alex Miller (prev0luti0n) said :
#3

Nevermind... I solved the problem after 9 Hours of work :D