← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #239217]: how to get text from given co-ordinates of the screen or screen region

 

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

    Status: Answered => Solved

DeepaKiran confirmed that the question is solved:
My problem was resolved by creating below function :

public String getTextFromBounds(int x, int y, int w, int h) throws FindFailed, IOException
{
BufferedImage bf = screen.capture(x,y,w,h).getImage();
File file1 = new File(System.getProperty("user.dir") + "\\getTextImage.png");
ImageIO.write(bf, "png", file1);
screen.wait(System.getProperty("user.dir") + "\\getTextImage.png");
String imageText = screen.find("getTextImage.png").text();
return imageText;
}

where in x,y,w,h are x coordinate, y coordinate, width and height.

Thanks all for help
Deepa Kiran

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