怎樣自動點擊探測到的顏色位置

if(!requestScreenCapture()){
toast("请求截图失败");
exit();
}
launchApp("WeChat");
sleep(2000);
var img = captureScreen();
toastLog("开始找色");
var point = findColorInRegion(img, "#004485", 1200, 1000, 200, 50);
if(point){
toastLog("x = " + point.x + ", y = " + point.y);
}else{
toastLog("没有找到");
}

if(!requestScreenCapture()){
toast("请求截图失败");
exit();
}
launchApp("WeChat");
sleep(2000);
var img = captureScreen();
toastLog("开始找色");
var point = findColorInRegion(img, "#004485", 1200, 1000, 200, 50);
if(point){
click(point.x,pirnt.y);
}else{
toastLog("没有找到");
}

  • 3
    帖子
  • 1224
    浏览

与 Auto.js 的连接断开,我们正在尝试重连,请耐心等待