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

Bhuvaneshwaran I gave more information on the question:
        public static Point getPositionOfImage(String screenPath,String 
filePath) {
                Point position=new Point();
                Finder finder=new Finder(screenPath);
                finder.findAll(filePath);
                if(finder.hasNext()) {
                        Match match=finder.next();
                        position.x=match.getX();
                        position.y=match.getY();
                        return position;
                }
                return null;
        }


        public static Point getPositionOfText(String screenPath, String text) 
throws FindFailed {
                Point position =new Point();
                Finder finder=new Finder(screenPath);
                Region r=finder.getRegion();
                r.existsText(text);
//              Screen s=new Screen();
//              IScreen sc=new IScreen("");
                Settings.SwitchToText=true;
//              Match r=s.findText(text);
                finder.findText(text);
                if(finder.hasNext()) {
                        Match match=finder.next();
                        position.x=match.getX();
                        position.y=match.getY();
                        return position;
                }
                return null;
        }

-- 
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     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to