sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #45837
[Question #664190]: Unable to find images on the second monitor
New question #664190 on Sikuli:
https://answers.launchpad.net/sikuli/+question/664190
Hi RaiMan,
Appreciate if you could help me with this question.
My monitor setup is as explained
I have a laptop with 2 monitors.
In the windows display setup, all the monitors have been setup to "Extend the desktop to this Display"
In the windows Display Setup
Monitor 3 is my main display and coordinate is (0,0)
Minotor 2 is at corodiante (1680,0)
Monitor 1 (laptop) at coordinate (0.-1360)
My screen set up as per Sikuli is as below
System.out.println("Number of screens: " + Screen.getNumberScreens());
System.out.println("Screen Bound screen 0: " + Screen.getBounds(0));
System.out.println("Screen Bound screen 1: " + Screen.getBounds(1));
System.out.println("Screen Bound screen 2: " + Screen.getBounds(2));
Number of screens: 3
Screen Bound screen 0: java.awt.Rectangle[x=0,y=0,width=1680,height=1050]
Screen Bound screen 1: java.awt.Rectangle[x=1680,y=0,width=1680,height=1050]
Screen Bound screen 2: java.awt.Rectangle[x=-1360,y=0,width=1360,height=768]
The Display setup and Sikuli program matches so far.
Step #1:
Now I place my application on the Monitor1 and run the below program
Screen screen = new Screen(0);
Region regConn = screen.find("C:\\Workspace\\sikuli-java-app\\src\\app\\login_connected.PNG");
regConn.highlight(10);
The image is found as expected.
Step #2:
Now I place my application on the Monitor1 and run the below program
Screen screen = new Screen(1);
Region regConn = screen.find("C:\\Workspace\\sikuli-java-app\\src\\app\\login_connected.PNG");
regConn.highlight(10);
Image is found. I am not sure why the image is found. Does this mean Screen(0) and Screen(1) are the same?
Interestinlgy
Step #3:
Now I place my application on the Monitor2 and run the below program
Screen screen = new Screen(2);
Region regConn = screen.find("C:\\Workspace\\sikuli-java-app\\src\\app\\login_connected.PNG");
regConn.highlight(10);
Image is not found. I was expecting the image would be found as I had application open in monitor 2.
Can you please explain this behaviour.
My requirement is that I have 2 applications running on each of the monitors and I should be able to control the individual applications.
Thanks in advance for your kind help.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.