← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #189258]: Basic numeric captcha recognizing

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- forwarding it to Tesseract
already tested Region.text(), that might return the digits directly as a string (but look bug 710586)?

--- And I actually don't know, what to do next
Use a shot of the pad before start, store the match, so you have the reference region for the pad.
With Preview feature evaluate the target offset of the first key and further evaluate the positions of the other keys based on the regular pixel distances between the rows/columns of the buttons. Store these click positions in a list.

pad = find("image-of-pad.png")
first = pad.getTargetOffset()
dist = 35 # measured pixels between two button centers

# Example for all buttons in one row 
for d in fourDigits:
     click(first.offset(int(d)*dist, 0))
     wait(1)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.