← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #673798]: Are image lists possible with Sikuli?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
This is how you can do that

--- yours is the dictionary (key/value store) variant:
player = {1: "1536849826828.png", 2: "1536849837900.png"}
# the keys can be whatever you like
first_image = player[2]
print first_image
if exists(first_image):
  print("SAW IT")

--- this would be the list variant
player = ["1536849826828.png",  "1536849837900.png"] 
# index starts with 0
first_image = player[1]
print first_image
if exists(first_image):
  print("SAW IT")

hope it helps

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