requestScreenCapture();
while (true) {
var img = captureScreen();
var point = findColor(img, ""); //这里填绿色色值
if (point) {
toast("找到绿色,坐标为(" + point.x + ", " + point.y + ")");
for (i = 0; i < 10; i++) {
press(point.x, point.y, 1)
}
var point2 = findColor(img, ""); //这里填确认的色值
if (point2) {
toast("找到确认,坐标为(" + point2.x + ", " + point2.y + ")");
for (i = 0; i < 10; i++) {
press(point2.x, point2.y, 1)
}
}
}
}