Comments (4)
更新一下安装包,https://pan.baidu.com/s/1i6KBbnv
from autojs.
我改了一下this.takeFromImage函数如下,可以实现指定好友不偷(只要将好友备注名加上不偷),然后觉得应该可以在每次检测到有保护罩之后,将信息记录下来。在下次偷取能量时根据保护罩消失时间自动判断是否将有保护罩的人名单加入不偷之列,以免每次收能量都得进去又出来。
因为是初学,这样简单的文件信息写入读取都还不太会,见笑了
this.takeFromImage2 = function (icon) {
var point;
var row_height = HEIGHT / 10;
var total = 0;
var times = 0;
var x = WIDTH / 2;
var takeSets=descMatches(/^((?!不偷|环保证书).)+/).boundsInside(200,200,1000,device.height*0.9).find()
// takeSets.forEach(function(child){log(child.contentDescription)});
if (takeSets.size()>0) {
while (times <this.options.max_retry_times) {
this.capture = captureScreen();
if (null ===this.capture) {
toastLog("截图失败");
times++;
sleep(200);
continue;
}
else{
break;
}
}
var options = {
region: [WIDTH - 200, 200],
threshold: 0.8}
point= findImage(this.capture, icon, options);
if (null != point) {
for (var i = takeSets.size() - 1; i >= 0; i--) {
var y=takeSets[i].bounds().centerY()
options = {
region: [device.width / 2,y-100, device.width / 2, 220],
threshold: 0.8
};
point = findImage(this.capture, icon, options);
if (null === point) {
continue;
}
else{
this.robot.click(x, y);
var title = "好友森林";
if (this.waitForLoading()) {
title = id("com.alipay.mobile.nebula:id/h5_tv_title").findOnce();
log("进入" + title.text() + "成功");
total++;
var cover=descMatches(/\d{2}:\d{2}:\d{2}/);
if (cover.exists() ) {
toastLog("保护罩还剩" + cover.findOne().contentDescription + ",忽略");
} else {
// 收取
this.take();
}
}
else {
toastLog("进入好友森林失败");
}
this.back();// 返回好友列表
sleep(1000);
}
}
}
}
return total;
};
from autojs.
@e1399579
通过更新 Auto.js-3.1.1 alpha5 问题解决
from autojs.
@thumike
有新的代码分享或讨论 可以再另开帖
这个issue我先关了哈
from autojs.
Related Issues (20)
- 群满员了,进不去
- 使用中的一些问题,请作者解答,谢谢!
- 在进行好友排行榜后无法正常获取 HOT 1
- 华为手机锁屏不生效,oneTasker的延时任务,tasker锁屏状态不能按时启动执行,请问怎么解决?
- No such file or directory
- No such file or directory
- No such file or directory
- No such file or directory
- 怎么识别 好友能量用了防护罩?
- 无法进入蚂蚁森林
- 进入蚂蚁森林失败 HOT 2
- 进入蚂蚁森林失败,群加不进去 HOT 3
- 请问下你是如何得到蚂蚁森林和蚂蚁庄园的appid? HOT 2
- 小米六,进入森林后就不动了,应该是可以收自己的能量,然后就,,就,,么得了 HOT 1
- 安卓8的系统,没有root,可以用微信运动点赞吗? HOT 1
- var desc = o.contentDescription失效
- failed to connect to www.infiniture.cn
- 请问auto.js从哪里下载 HOT 4
- 弃坑了吗
- autojs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autojs.