← Back to team overview

sikuli-driver team mailing list archive

[Question #670847]: loop click one image only from a list

 

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

so i'm making this beginner script for a game and i have tried alot of methods but nothing helped me solve my problem.
i want my script to click some specific images as they appear on screen(i can do this no problem) then i will see 15 images which i saved them in a list i want to choose only one image from the list and click it then continue my script and next script run choose the next image from list and so on and repeat this forever.. something which look like this:
while True:
click("1531176838693.png")
wait(5)
click("1531176913033.png")
wait(35)
click("1531177052212.png")
wait(5)
imagelst = [                                             --i want to choose only one from this list every time i loop here
"1531365554265.png",
"1531365585043.png",
"1531365601372.png",
"1531365618428.png",
"1531365633758.png",
"1531365644149.png",
"1531365656034.png",
"1531365676365.png",
"1531365689264.png",
"1531365698168.png",
"1531365713198.png",
"1531365723352.png",
"1531365738467.png",
"1531365751831.png",
"1531365763188.png"]    ------------- then  continue my script normally

click("1531182624939.png")
wait(5)
click("1531182731781.png")
wait(3)
click("1531272347054.png")

any help will be appreciated.. thanks

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