sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33240
Re: [Question #268573]: Java API - FindFailed: can not find image on second monitor
Question #268573 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/268573
Summary changed to:
Java API - FindFailed: can not find image on second monitor
Description changed to:
I'm using Java IDE with Sikuli to detect image on second monitor. Code
works fine on default monitor in Java IDE and in Sikuli IDE for voth
monitors. But doesn't find on second monitor with Java IDE.
Code:
package sikuli;
import org.sikuli.script.*;
public class Sikuli {
public static void main(String[] args) {
Screen scr1 = new Screen(1);
try{
System.out.println(scr1.getNumberScreens());
System.out.println(scr1.find("C:\\Sikuli\\Sikuli 1.1.0\\Scripts\\Working.sikuli\\plus.png"));
scr1.click("C:\\Sikuli\\Sikuli 1.1.0\\Scripts\\Working.sikuli\\plus.png");
}
catch(FindFailed e){
e.printStackTrace();
}
}
}
Error:
FindFailed: can not find C:\Sikuli\Sikuli 1.1.0\Scripts\Working.sikuli\plus.png in S(1)[-1280,0 1280x1024]
Line 2151, in file Region.java
at org.sikuli.script.Region.handleFindFailedShowDialog(Region.java:2151)
at org.sikuli.script.Region.handleFindFailed(Region.java:2096)
at org.sikuli.script.Region.wait(Region.java:2298)
at org.sikuli.script.Region.find(Region.java:2167)
at sikuli.Sikuli.main(Sikuli.java:8)
Process exited with exit code 0.
Thanks for yout help.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.