本帖最后由 wushaominkk 于 2019-9-2 08:49 编辑
适配安卓7.0,1080*1920分辨率,效率不高但简单实用。
[Java] 纯文本查看 复制代码 if(!requestScreenCapture()){
toast("请求截图失败");
exit
}
sleep(2000);
var i = 0;
var t = 300;
setInterval(function(){
i++;
var img = captureScreen();
var x = 360;
var y = 710;
var isDetected = images.detectsColor(img, "#F9F5E8", x, y);
if(isDetected){
click (x,y );
}
x = 600;
y = 710;
var isDetected = images.detectsColor(img, "#F9F5E8", x, y);
if(isDetected){
click (x,y );
}
x = 840;
y = 710;
var isDetected = images.detectsColor(img, "#F9F5E8", x, y);
if(isDetected){
click (x,y );
}
x = 360;
y = 1030;
var isDetected = images.detectsColor(img, "#F9F5E8", x, y);
if(isDetected){
click (x,y );
}
x = 600;
y = 1030;
var isDetected = images.detectsColor(img, "#F9F5E8", x, y);
if(isDetected){
click (x,y );
}
x = 840;
y = 1030;
var isDetected = images.detectsColor(img, "#F9F5E8", x, y);
if(isDetected){
click (x,y );
}
sleep (500);
for(var j = 0; j < 20; j++){
click(950, 1750);
sleep(100);
}
if(i == 800){
exit();
}
}, 1000); |