← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #274947]: Failed to extract multiple texts on a screen with similar images

 

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

    Status: Open => Answered

masuo proposed the following answer:
text() extract the text contained in the region .
Use Region() in order to adjust region .

[example:]
f = find(Pattern("sites.png").exact())
dx = 0
dy = 0
dw = 0
dh = 10
x = f.getX() + dx
y = f.getY() + f.getH() + dy
w = f.getW() + dw
h = dh
r = Region(x, y, w, h).highlight(2)
print r.text()

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