← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #175301]: How to select the target region in the screen shot

 

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

Sergio K. Sawae proposed the following answer:
Santosh
Try this.

import org.sikuli.script.*;
public class TestSikuli {
        public static void main(String[] args) {
                Screen s = new Screen();
                Pattern pImage = new Pattern("imgs/spotlight.png").targetOffset(-10,0);
                Match r = s.exists(pImage,1);
                try{
                        s.click(r, 0);
                        s.wait("imgs/spotlight-input.png");
                        s.type(null, "hello world\n", 0);
                }
                catch(FindFailed e){
                        e.printStackTrace();
                }
        }
}

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