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

IgorG proposed the following answer:
A possible solution may looks like:
    matches = r.listText() # get the match regions occupied by the pixels of a 
word
    for m in matches:
        #m.highlight(1) 
        word = m.getText()
        labelX = m.getX()
        labelY = m.getY()
        labelH = m.getH()
        labelW = m.getW()

To compare the strings Python has a handy function SequenceMatcher in the 
library called difflib :
import difflib
def howSimilar(str1, str2): 
    return difflib.SequenceMatcher(None, str1, str2).ratio() 

It suppose to return a number from 0 to 1.

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to