sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #52118
[Bug 1833356] Re: [1.1.3] findAll fails but image exists --- workaround --- fixed in 1.1.4
All the best for your holidays.
I made some tests now with 1.1.3 and have to admit, that exists() and
findAll() might not always give the same result.
See the documented workaround.
** Summary changed:
- [1.1.3] findAll fails but image exists --- workaround
+ [1.1.3] findAll fails but image exists --- workaround --- fixed in 1.1.4
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1833356
Title:
[1.1.3] findAll fails but image exists --- workaround --- fixed in
1.1.4
Status in Sikuli:
Confirmed
Bug description:
******************************** workaround
;-) best workaround is to use 1.1.4
for 1.1.3:
using exists(), wait() or find() and getting a similarity score of x, then with findAll() the same image might come up with a score of x - 0.03 down to x - 0.1.
so using
exists(Pattern(someImage).similar(score))
then this will assure, to come back with the same result (first
match):
findAll(Pattern(someImage).similar(score - 0.1))
----------------------------------------------------
Code
def Find_All_Close_X(v_Image):
if exists(v_Image,0.2):
v_Pos = find(v_Image)
print "v_Pos",v_Pos
hover(Location(v_Pos.x,v_Pos.y))
print "hovering",v_Pos.x,v_Pos.y
popup("Found and hovering")
v_Result = findAll(v_Image)
else:
print "Not Found"
v_Image_p = "/home/jeff/SikuliScripts_Linux/Subs/Vikings/Close X big Region.png"
sx = 422 ; sy = 132 ; sw = 505 ; sh = 270
setRect(sx,sy,sw,sh)
g_Find_Matching = 0.85
for i in range(20):
print "^ " * 40 ,"Try", g_Find_Matching
v_Image = Pattern(v_Image_p).similar(g_Find_Matching)
Find_All_Close_X(v_Image)
g_Find_Matching = g_Find_Matching - 0.01
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1833356/+subscriptions
References