if(!requestScreenCapture())
{ toast("请求截图失败"); }
sleep(1000);
var img = captureScreen();
sleep(500);
//检测在点(x, y)处是否有颜色0x73bdb6 (模糊比较)
if (images.detectsColor(img, 663,1071, 0xfeba32))
{
click(663,1071);
sleep(1000);
}
if(images.detectsColor(img, 831, 1019, 0x9c9385))
{
click(429, 1623);
sleep(1000);
}
if (images.detectsColor(img, 708,1151, 0xfeba32))
{
click(708,1151);
}
if (images.detectsColor(img, 883,620, 0x12ff00))
{
click(547,1410);
}
if (images.detectsColor(img, 541,1506, 0xfeba32))
{
click(541,1506);
}
if (images.detectsColor(img, 86,369, 0x55f843))
{
click(299,1134);
sleep(500);
click(302,776);
}
不知道问题出在哪。。。之前写的最近才有空研究下,运行次数多了if判断那里会报错,之前有人告诉我是缓存被清理了emmm