HowTo use Similar? --- use Pattern()

Bug #1665372 reported by Jeff_Vallis on 2017-02-16

This bug report was converted into a question: question #463637: HowTo use Similar?.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Undecided
Unassigned

Bug Description

1.1.1(2015-11-26_01:00nightly)/Mac10.12.3/Java8(64)1.8.0_25-b17

trying to use similar i pattern matching and failed
So I did a search and found an example which I changed to include an image on screen :
( example - http://doc.sikuli.org/match.html )

the Example with my image in : -

m = find("1487256669914.png".similar(0.5).targetOffset(100,0))
print m # message area: Match[10,0 30x22] score=1.00, target=(105,11)

Result
[error] script [ Crap ] stopped with error in line 13
[error] AttributeError ( 'str' object has no attribute 'similar' )

This the same error message that I am getting from my exists test
    if exists("1487245533829.png".similar(0.95)):
[error] ...... stopped with error in line 289
[error] AttributeError ( 'str' object has no attribute 'similar' )

RaiMan (raimund-hocke) wrote :

invalid use of similar ;-)
see answer to question.

Changed in sikuli:
status: New → Invalid
summary: - Similar error
+ howTo use Similar? --- use Pattern()
summary: - howTo use Similar? --- use Pattern()
+ HowTo use Similar? --- use Pattern()
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions