requestScreenCapture(); //request capture authorization
sleep(1000);
captureScreen("/sdcard/at/c.jpg"); //save captured photo
sleep(1000);
toastLog("Complete");
//read photo
var src = images.read("/sdcard/at/c.jpg");
//cutting photo //images.clip(img, x, y, w, h)
var clip = images.clip(src, 182, 274, 100, 100);
//save photo
images.save(clip, "/sdcard/at/small.jpg");
requestScreenCapture();
sleep(1000);
//read photo
var img_small = images.read("/sdcard/at/small.jpg");
//find in large photo
//images.findImage(large photo, small photo) <------return coordination(Point) or return null.
var p = findImage(captureScreen(), img_small);
if (p) {
toastLog("Found,located at:" + p.x + "----" + p.y);
click(p.x, p.y); //click coordination
} else {
toastLog("Cannot be found!");
}