Giter VIP home page Giter VIP logo

ant-forest-autoscript's Introduction

Hi 👋, I'm NickHopps.

A passionate fullstack developer from China.


Skills

Native:

c cplusplus

Frontend:

html5 pug css3 javascript typescript vuejs bootstrap tailwind nodejs babel sass nuxtjs

Backend:

python php django flask mysql redis sqlite

Frontend Engineering:

webpack puppeteer gulp jest mocha

System & Tool:

linux bash docker git nginx

Status

ant-forest-autoscript's People

Contributors

ihx-rainbow avatar nick-hopps avatar tonyjiangwj avatar ysinsane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ant-forest-autoscript's Issues

BUG

运行的时候出现一个Bug,错误代码如下
**

Wrapped java.lang.IllegalStateException : nodelnfo. viewldResourceName must not be null

**
在开始收取好友能量的时候也出现了Bug。
刚去百度了下,这个Bug是因为 Auto.js 版本的问题. Auto.js版本 请下载 4.0.1 Bate。 新版本4.0.5Alpha会报错

运行config 和main出错

08:14:28.424/E: TypeError: Cannot find function all in object [object Object]. (

#15)
at script(:15)

08:14:44.576/E: ReferenceError: "activity" is not defined. (ui.js#6)
at script(ui.js:6)
at script.draw_view(:32)
at script(:181)

运行报错

当好友的能量在倒计时时会报这个错误

错误: Wrapped java.lang.lllegalArgumentException: x must be < bitmap.width() (images.js#123)

崩溃问题

1、运行一两遍会导致auto.js崩溃,并且日志也被清空了。
2、有没有什么方法,开始不用获取截屏授权,直接运行。
3、经常运行一遍结束后,卡在好友列表最低端不运行。

1,3两个问题比较急切。手机是小米8

锤子坚果pro2s锁屏点亮没有打开支付宝

正常运行没问题。等待灭屏后,自动亮屏,没有设置密码,正常进入桌面,但是没有打开支付宝。
日志显示:已是最新版;正在偷取能量。
然后就没有了。

bug反馈,多个支付宝包名时,无法智能打开,只能手动选择

15161952

如图,魅族手机可以设置支付宝的应用分身,分身与原软件属于同一个包名,会导致打开支付宝的时候卡主,手动选择后才会继续运行

// 进入蚂蚁森林主页
const _start_app = function() {
app.startActivity({
action: "VIEW",
data: "alipays://platformapi/startapp?appId=60000002",
});
}

请问下,这块能否进行优化

荣耀畅玩6x不能解锁

大佬,脚本可以收取能量。如果锁频的话,亮屏后不能滑动进入解锁界面,也就无法输入密码解锁了,望大佬修复。感谢

bug反馈

如果运行脚本之前支付宝在后台,并且已经进入好友排行的话,那么脚本将不能运行成功
运行日志:
23:56:46.506/D: 当前能量:159736
23:56:46.533/D: 无可收取能量
23:56:46.533/D: 开始收集好友能量
23:56:46.910/V:

[/storage/emulated/0/脚本/蚂蚁/main.js]运行结束,用时3.319000秒

稳定全天运行的建议

autojs中的延时执行有两个问题:

  1. 时间不准确,无法准时执行
  2. 会被音量上键全局终止,停止执行

经测试使用tasker管理定时任务,调用autojs执行的方案更稳定,基本保证全天准时执行,关键在于autojs向tasker传递下次执行时间的参数,可参考Tasker 与 Autojs 之间如何传递数据的后半部分

手机解锁画面不上滑,无法弹出密码页面

由于锁屏会根据手指的滑动速度决定是否弹出密码页面。建议用以下的方式上滑。

  var xyArr = [220]
  var x0=device.width/2
  var y0=device.height/4*3
  var angle = 0
  var x = 0
  var y = 0
  for (let i = 0; i < 30; i++) {
    y = x * tan(angle)
    log(y)
    if((y0-y)<0){
      break
    }
    var xy = [x0+x,y0-y]
    xyArr.push(xy)
    x += 5;
    angle += 3
  }
  gesture.apply(null,xyArr)
  function tan(angle) {
    return Math.tan(angle * Math.PI / 180);
  }

运行config出错

手机:HTC U11
系统:HTC港版8.0
最新版脚本,4.0.1beta版本的auto.js
config.js运行报错如下:

22:05:32.702/E: ReferenceError: "activity" is not defined. (ui.js#15)
at script(ui.js:15)
at script.draw_view(:32)
at script(:181)

打开蚂蚁森林会卡住

原因在于如果支付宝没有退出,并且位于不在蚂蚁森林首页的其他页面,会卡着,因为在waitfor 背包。
不知是否可以加入超时检测,然后退出支付宝,重新进入

希望能支持多语言

个人所有app都是用英语的,相信也有用繁体中文之类的同学,希望能加一个多语言的设置。
将几个字符串拿出来用变量替代应该不是很大工程,虽然能帮助的人不多,但还是有人能受益的。
希望采纳

华为荣耀magic2问题汇总

/E: Wrapped android.view.InflateException: android.view.InflateException: java.lang.ClassNotFoundException: android.widget.card (floaty.js#9)
at script(floaty.js:9)
at script(file:/storage/emulated/0/脚本/Ant-Forest-autoscript/core/Ant_forest.js:52)
at script(file:/storage/emulated/0/脚本/Ant-Forest-autoscript/core/Ant_forest.js:202)
at script(file:/storage/emulated/0/脚本/Ant-Forest-autoscript/core/Ant_forest.js:362)
at script(file:/storage/emulated/0/脚本/Ant-Forest-autoscript/core/Ant_forest.js:376)
at script(

:51)

华为荣耀magic2报错~ 收集完一圈后(从“没有更多了”回到好友排行榜时)报错

魅族15plus无法运行

12:00:31.189/E: ReferenceError: "activity" is not defined. (file:///android_asset/modules/ui.js#14)
ReferenceError: "activity" is not defined.
at file:///android_asset/modules/ui.js:14:0
at draw_view (/storage/emulated/0/脚本/Ant-Forest-autoscript-master/config.js:32:0)
at /storage/emulated/0/脚本/Ant-Forest-autoscript-master/config.js:181:0

一些BUG

设备:小米9

我认真观看运行,发现打开帮收朋友能量后,有时候点击进入,并不会帮忙收取,只是进入后就返回列表,速度非常快。有时候进入有能量可以偷取的朋友,也只是偷取了能量,并有没把帮忙收取的点击。

以及在早晨7点这种朋友能量多的时刻,计时似乎有点问题,具体表现在偷取能量列表上,有还剩1分钟的能量,结果当一次偷取完后,返回桌面,此时日志中显示下次偷取是4分钟。这导致错过很多能量偷取。

收集完能量运行报错

手机:HTC U11
系统:HTC港版8.0
最新版脚本,4.0.1beta版本的auto.js
main.js运行的时候可以正常收1次能量。但是在以下2种情况会报错:
1、收完1次能量,如果所有好友的头像上都没有倒计时的话,会报错。
2、收完1次能量,如果好友倒计时比较长(据观察应该是大概超过30分钟的)的话,会报错。
报错时,画面停留在自己的小树上,不会返回桌面,脚本停止。

报错日志如下:
22:26:35.637/E: Wrapped android.view.InflateException: android.view.InflateException: java.lang.ClassNotFoundException: android.widget.card (floaty.js#9)
at script(floaty.js:9)
at script(file:/storage/emulated/0/脚本/Ant-Forest-3.20/core/Ant_forest.js:52)
at script(file:/storage/emulated/0/脚本/Ant-Forest-3.20/core/Ant_forest.js:202)
at script(file:/storage/emulated/0/脚本/Ant-Forest-3.20/core/Ant_forest.js:362)
at script(file:/storage/emulated/0/脚本/Ant-Forest-3.20/core/Ant_forest.js:376)
at script(

:51)

bug

好友列表的最后是一些不玩蚂蚁森林的好友,他们的右边显示的是绿色的“邀请”按钮。
脚本运行,当好友列表自动滑动到这里,还没有到“没有更多了”前,脚本就会卡住。

华为荣耀v10报错

新版本报错,旧版本好像没啥问题(如有再补充)
autojs 4.0.5Alpha 版本

_20190208141941

小米9解锁失败

Screenshot_2019-04-17-15-50-09-181_org autojs aut

见到亮起屏幕,然后看似上滑的动画,但是没有进入解锁界面。然后就熄灭了。等待了两分钟,手动打开手机,看到日志如图。

一加五解锁失败

报错,提示
01:52:59.846/E: Error: Can't resolve relative module ID "./lib/Automator.js" when require() is used outside of a module (file:///android_asset/modules/jvm-npm.js#89)
Error: Can't resolve relative module ID "./lib/Automator.js" when require() is used outside of a module
at Require (file:///android_asset/modules/jvm-npm.js:89:0)
at Tmp.js:40:0
autojs版本4.1.1,一加五,Android9

4.0.5版本的autojs运行,打开排行榜就报错

02:25:51.308/E: Wrapped java.lang.IllegalStateException: nodeInfo.viewIdResourceName must not be null (file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/core/Ant_forest.js#289)
Wrapped java.lang.IllegalStateException: nodeInfo.viewIdResourceName must not be null
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/core/Ant_forest.js:289:0
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/core/Ant_forest.js:323:0
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/core/Ant_forest.js:340:0
at /storage/emulated/0/脚本/Ant-Forest-autoscript-master/main.js:35:0

定时任务解锁屏幕时报错

系统: MIUI 9 Android 7.0
Auto.js: 4.0.5 Alpha

07:00:01.645/E: Wrapped java.lang.IllegalStateException: nodeInfo.viewIdResourceName must not be null (file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/lib/Unlock.js#138)
Wrapped java.lang.IllegalStateException: nodeInfo.viewIdResourceName must not be null
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/lib/Unlock.js:138:0
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/lib/Unlock.js:121:0
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript-master/lib/Ant_forest.js:222:0
at /storage/emulated/0/脚本/Ant-Forest-autoscript-master/main.js:35:0

收取自己的能量会被活动干扰

当蚂蚁森林页面,自己的能量球周围出现活动时会点击进入活动页面,导致无法运行到收取好友能量。
比如,今天是3月13日,蚂蚁森林有个春种活动,脚本会打开春种活动页面然后就一直在这里等待了。

image

建议增加每次收取完毕的日志

建议增加每次收取完毕的日志,在日志中打印一下本次收取了多少g能量
目前只有没能量收,运行结束的时候才会有悬浮窗提示,如果能每次打印一个log就更好了

每次在第2次运行的时候报错,使用的是4.1.1的autojs

10:03:35.449/D: 第 2 次运行
10:03:39.086/D: 开始收集自己能量
10:04:44.323/E: Wrapped java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.view.accessibility.AccessibilityNodeInfo.getPackageName()' on a null object reference (file:/storage/emulated/0/脚本/Ant-Forest-autoscript/core/Ant_forest.js#314)
Wrapped java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.view.accessibility.AccessibilityNodeInfo.getPackageName()' on a null object reference
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript/core/Ant_forest.js:314:0
at file:/storage/emulated/0/脚本/Ant-Forest-autoscript/core/Ant_forest.js:342:0
at /storage/emulated/0/脚本/Ant-Forest-autoscript/main.js:35:0

一加3t手机,magisk root,下载后未做任何设置,直接运行main.js便利到排名最后结束时程序会崩溃报错

Version: 256
Android: 26
java.lang.RuntimeException: android.view.InflateException: android.view.InflateException: java.lang.ClassNotFoundException: android.widget.card
at com.stardust.autojs.core.ui.ConvertLayoutInflater.inflate(ConvertLayoutInflater.java:32)
at com.stardust.autojs.runtime.api.Floaty.lambda$inflate$0$Floaty(Floaty.java:70)
at com.stardust.autojs.runtime.api.Floaty$$Lambda$0.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6798)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:108)
Caused by: android.view.InflateException: android.view.InflateException: java.lang.ClassNotFoundException: android.widget.card
at com.stardust.autojs.core.ui.inflater.DynamicLayoutInflater.inflate(DynamicLayoutInflater.java:142)
at com.stardust.autojs.core.ui.inflater.DynamicLayoutInflater.inflate(DynamicLayoutInflater.java:127)
at com.stardust.autojs.core.ui.ConvertLayoutInflater.inflate(ConvertLayoutInflater.java:29)
... 10 more
Caused by: android.view.InflateException: java.lang.ClassNotFoundException: android.widget.card
at com.stardust.autojs.core.ui.inflater.DynamicLayoutInflater.createViewForName(DynamicLayoutInflater.java:212)
at com.stardust.autojs.core.ui.inflater.DynamicLayoutInflater.inflate(DynamicLayoutInflater.java:155)
at com.stardust.autojs.core.ui.inflater.DynamicLayoutInflater.inflate(DynamicLayoutInflater.java:140)
... 12 more
Caused by: java.lang.ClassNotFoundException: android.widget.card
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at com.stardust.autojs.core.ui.inflater.DynamicLayoutInflater.createViewForName(DynamicLayoutInflater.java:202)
... 14 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.widget.card" on path: DexPathList[[zip file "/data/app/com.stardust.scriptdroid-XnwwJVYpMxC-liUHwRahBQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.stardust.scriptdroid-XnwwJVYpMxC-liUHwRahBQ==/lib/arm, /system/fake-libs, /data/app/com.stardust.scriptdroid-XnwwJVYpMxC-liUHwRahBQ==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 18 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.