sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #26965
[Question #251515]: sikuli doesn't recognize an image on list in a loop
New question #251515 on Sikuli:
https://answers.launchpad.net/sikuli/+question/251515
Hi,
I've a problem, I use this code: (sorry it's so ugly but...)
list_menu=[]
list_menu_triangle=[[] for _ in range(25)]
list_menu_triangle_carre=[[[] for _ in range(25)] for _ in range (75)]
count_menu=0
for j in findAll(image1):
click(j)
for menu in region1.findAll(image.menu):
a=0
click(menu)
wait(1)
stop=0
itt=0
finish=0
verify=0
for itt in range(0,count_menu):
if menu==list_menu[itt]:
verify=1
if verify==1:
list_triangle=[]
count_triangle=0
for triangle in region1.findAll(image.triangle):
list_triangle.append(triangle)
count_triangle=count_triangle+1
for a in range(0,count_triangle):
for itt in range(0,count_triangle):
if list_triangle[a]==list_menu_triangle[count_menu][itt]:
verify=2
if verify==2:
click(list_triangle[a])
list_carre=[]
count_carre=0
for carre in region.findAll(image.carre):
list_triangle_carre[a].append(carre)
count_carre=count_carre+1
b=0
for b in range (0,count_carre):
for itt in range(0,count_carre):
if list_triangle_carre[a][b]==list_menu_triangle_carre[count_menu][a][itt]:
verify=3
if verify==3:
continue
else:
click(list_carre[b])
list_menu_triangle_carre.append[count_menu][a][b]
list_count_carre[count_menu][a]=list_count_carre[count_menu][a]+1
finish=1
b=b+1
break
else:
click(list_triangle[a])
list_menu_triangle[count_menu].append(list_triangle[a])
carre=region1.find(image.carre)
click(carre)
list_menu_triangle_carre[count_menu][a].append(carre)
finish=1
a=a+1
else:
click(menu)
list_menu.append(menu)
count_menu=count_menu+1
triangle=region1.find(image.triangle)
click(triangle)
wait(0.1)
list_menu_triangle[count_menu].append(triangle)
carre=region1.find(image.carre)
click(carre)
list_menu_triangle_carre[count_menu][a].append(carre)
finish=1
if finish==1:
break
click(ok)
In fact in the first turn of loop all it's right, but after, it's always the same buttom which is clicked.
It seems that the image which is on the list doesn't recognize the next step.
Sorry for my English.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.