Commits

Tom Yeh committed 3447e0a

allowed simulator to close at the end

Comments (0)

Files changed (1)

examples/src/main/java/org/sikuli/api/examples/CavnasExample.java

 package org.sikuli.api.examples;
 import java.awt.Color;
-import java.awt.Rectangle;
-import java.awt.image.BufferedImage;
-import java.io.File;
 import java.io.IOException;
 import java.util.List;
 
 import org.sikuli.api.Relative;
 import org.sikuli.api.ScreenRegion;
 import org.sikuli.api.Target;
-import org.sikuli.api.visual.ImageViewer;
 import org.sikuli.api.visual.ScreenRegionCanvas;
 
 public class CavnasExample {
 	static ScreenSimulator simulator = new ScreenSimulator(){
 		public void run(){
 			showImage(Images.OSXDockPreferences);
-			//			wait(8000);
-			//			close();
 		}
 	};
 
 	public static void main(String[] args) throws IOException {
 		simulator.start();
 
-		Rectangle b = simulator.getBounds();
 		ScreenRegion s = new DesktopScreenRegion();
 		
 		Target imageTarget = new ImageTarget(Images.ThumbIcon);
 		}
 		canvas.display(3);
 		
+		simulator.close();
+		
 	}
 }