Code Monkey home page Code Monkey logo

Comments (13)

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024 1
  • 尝试删除lib/WidgetUtils.jsline:99 代码idMatches(idRegex).findOne()
  • 通过布局范围分析,查找好友列表中有没有控件id匹配正则 /.*react-content.*/,默认配置的是 排行榜布局中最顶上 个人信息控件区域的id 如果你的不同 修改config.js line: 99相应的值friend_list_id: '.*react-content.*',

from ant-forest.

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024 1
  • 上下两个大的区域,随便点按一个 进入 在布局层次中查看
  • 从根节点开始查看是否有被隐藏掉的控件。如果没有那么很遗憾暂时没法使用这个脚本了。需要通过图片识别才行了
  • 如果有,那可能还是可行的。只是会比较麻烦:总体思路是重新分析布局控件,获取到好友列表的控件。
  • 首先是修改判断是否进入好友列表的方法lib/WidgetUtils.js line:157friendListWaiting
    /**
     * 校验是否成功进入好友排行榜
     */
    const friendListWaiting = function () {
      return idWaiting(_config.friend_list_id, '好友排行榜')
    }
  • 然后替换掉lib/WidgetUtils.js line:312getFriendListParent 方法
    const getFriendListParent = function getFriendRoot () {
      let anyone = null
      let regex = /[.\d]+[kgt]+$/
      let countdown = new Countdown()
      if (textMatches(regex).exists()) {
        anyone = textMatches(regex).findOnce(1)
        debugInfo('当前获取到的能量值内容:' + anyone.text())
      } else if (descMatches(regex).exists()) {
        debugInfo('当前获取到的能量值内容:' + anyone.desc())
        anyone = descMatches(regex).findOnce(1)
      }
      countdown.summary('获取能量值控件')
      if (anyone) {
        try {
          return anyone.parent().parent().parent()
        } catch (e) {
          errorInfo('获取能量值控件失败' + e)
        }
      } else {
        errorInfo('获取能量值控件失败')
      }
    }
  • 后期有时间可能会加入图片识别,不过也可能会遥遥无期。目前很多功能都是基于控件的
  • 由于我们的布局差异,我这边没法提供进一步的帮助了。祝成功~ ISSUE暂时就关闭了

from ant-forest.

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024

升级一下最新版v1.1.1.1 修改了排行榜的判断

from ant-forest.

hkx303 avatar hkx303 commented on July 24, 2024

Thanks for the quick reply :)

升级至1.1.1.1后,打开蚂蚁森林进入总排行榜后问题依旧;
日志信息:
422246769

from ant-forest.

hkx303 avatar hkx303 commented on July 24, 2024

Thanks for the detailed solution, I will try this and give feedback

from ant-forest.

hkx303 avatar hkx303 commented on July 24, 2024

Hi,
通过查看更多好友进入排行榜后,通过布局范围分析
我发现页面仅剩下如下几个控件:
1878001368

这几个控件仅返回蚂蚁森林控件有id,而且是蚂蚁森林初始页面都有的,有进一步的解决方案吗?

from ant-forest.

hkx303 avatar hkx303 commented on July 24, 2024

更正:
上述 返回 控件初始页面没有,所以我把 config.js line: 99 的值friend_list_id替换为'.*h5_nav_bak*'
再次测试可以正常进入总排行榜页面,未再显示“无法进入好友排行榜”错误。
但是出现了新的错误:获取能量值控件失败首次获取列表数据不完整,再次获取,陷入死循环,无法停止。

from ant-forest.

hkx303 avatar hkx303 commented on July 24, 2024
  • 查看 布局层次分析 ,没有发现被隐藏的控件
  • 同意你说的说法,基于控件的脚本应该基本都无法使用,我想这也是003作者脚本 进入排行榜后没有进一步动作的原因
  • 谢谢耐心解释及提供的进一步方法

from ant-forest.

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024

基于图像识别的已经上线,没有发布release,直接下载代码 然后运行config.js 在进阶配置中勾选基于图像分析选项即可,当前还是测试性功能

from ant-forest.

hkx303 avatar hkx303 commented on July 24, 2024

基于图像识别的已经上线,没有发布release,直接下载代码 然后运行config.js 在进阶配置中勾选基于图像分析选项即可,当前还是测试性功能

Screenshot_20191211_163347_org autojs autojs
下载代码,运行config.js后勾选基于图像分析
运行main.js报错,日志如上

from ant-forest.

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024
  • 查看lib/autojs-tools.dex是否存在
  • 然后强制关闭AutoJS软件后重新开始
  • 新的图像分析方法调用了封装的Java方法,因为AutoJS中纯JS实现的BitMap实在太慢了

from ant-forest.

hkx303 avatar hkx303 commented on July 24, 2024

强行重启应用后可以运行。但发现了如下问题:

1、打开总排行榜滑动至第二十位好友时,报错
报错时的错误提示:
获取截图失败多次[3],可能已经没有了截图权限,重新执行脚本。

2、打开总排行榜滑动至第二十位好友时,直接退出,本轮收取完毕

3、打开总排行后重复进入一能量待成熟标志的好友界面,重复几次后退出,收取完毕

版本暂未release,提供些信息哈,作者加油

from ant-forest.

TonyJiangWJ avatar TonyJiangWJ commented on July 24, 2024

哦对了 忘了说了
图像识别开启的同时 得同时开启 是否启用模拟滑动 然后 滑动速度(ms)修改为200
排行榜下拉次数按实际好友数修改大概比例为 100个好友13-15 保险起见设置大一些也没事 就是会在底部滑动很多次 后续找办法解决判定是否到达列表底部 上述2,3都是因为这个配置导致的 1不大确定
先这么改着,今晚会继续更新一些代码


新版1.2.0.0已发布Releases

from ant-forest.

Related Issues (20)

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.