Commits

Tom Yeh committed 2759f79

used the inner region to test image target search in the multiscreen example code

  • Participants
  • Parent commits 83de5f4

Comments (0)

Files changed (1)

File examples/src/main/java/org/sikuli/api/examples/MultiScreenExample.java

 	public static void main(String[] args) throws IOException  {
 		Mouse mouse = new DesktopMouse();
 		
-		// iterate through each screen
+		// iterate through each screen, the mouse cursor will traverse along the edges
+		// of a rectangle centered on each screen clockwise, and then clicks on the dog image
 		int numOfScreens = DesktopScreen.getNumberScreens();
 		for (int screenId = 0; screenId < numOfScreens; screenId++){
 			
 			mouse.hover(Relative.to(innerRegion).bottomLeft().getScreenLocation());
 			
 			// find the dog and click on it
-			ScreenRegion dog = screenRegion.find(new ImageTarget(Images.Dog));
+			ScreenRegion dog = innerRegion.find(new ImageTarget(Images.Dog));
 			mouse.click(dog.getCenter());
 			
 			c.hide();