基于autojs7的亚丁号点淘辅助

简介: 基于autojs7的亚丁号点淘辅助

源代码下载地址:点淘.rar - 蓝奏云

最近点淘非常火爆,火爆的原因就是收益高呗。所以我也参与了一下写了个辅助自己刷刷刷了一下感觉还可以。主要有这么几个简单的功能:

  1. 自动翻页看视频,这个是基本功能都应该有。
  2. 自动签到
  3. 自动提现
  4. 清理App缓存
  5. 清理手机缓存(R9SK或者是安卓7机器)
  6. 开启控制台
  7. 下载点淘
  8. 随机上滑
  9. 随机下滑
  10. 随机关注

此软件是使用autojs pro 7编写的,虽然7这个破解版不是很好,但是支持找图,还是使用了。本次核心技术就是找图我自己编写的方法还不错支持多个图片一起找。

/**
 * 找图,找到并点击
 * @param {可以是数组也可以是字符串,传输数组可以多次找图知道找到为止} img_path_array 
 * @param {找图区域,默认是全屏找图,该参数可以不传输} area_region 
 * @param {相似度,默认是0.8,可以不传输} threshold 
 * @returns true表示执行成功Flase表示失败
 */
Tools.clickAreaForFindImage=function(img_path_array, area_region, threshold,is_continue) {
    try {
        area_region = area_region || [0, 0, device.width, device.height] //默认的找图区域 全屏找图 前2位是坐标 后面是长度和宽度   千万别理解成是坐标
        threshold = threshold || 0.8 // 默认的相识度0.8
        is_continue=is_continue|| false
        if (img_path_array instanceof Array) {
            let arrayLength = img_path_array.length
            for (let i = 0; i < arrayLength; i++) {
                //toastLog("正在进行第" + (i + 1) + "次找图...")
                img_path = img_path_array[i] //小图地址可判断是否存在
                if (!files.exists(img_path)) {
                    toastLog(img_path + "文件不存在因此跳过")
                    continue
                }
                var little_image = images.read(img_path) //小图
                var find_result_bounds = findImage(
                    captureScreen(), little_image, {
                    region: area_region,
                    threshold: threshold
                });
                if (find_result_bounds) {
                    toastLog(img_path+"图找到,准备点击坐标:" + find_result_bounds)
                    click(find_result_bounds.x, find_result_bounds.y)
                    return true
                } else {
                    //toastLog(img_path+"小图存在但是在大图中未找到图片进入下一次循环...")
                }
            }
            return false
        }
        if (typeof (img_path_array) == "string") {
            img_path = img_path_array//小图地址可判断是否存在
            if (!files.exists(img_path)) {
                toastLog(img_path + "文件不存在因此跳过")
                return false
            }
            var little_image = images.read(img_path) //小图
            var find_result_bounds = findImage(
                captureScreen(), little_image, {
                region: area_region,
                threshold: threshold
            });
            if (find_result_bounds) {
                toastLog(img_path+"图找到,准备点击坐标:" + find_result_bounds)
                click(find_result_bounds.x, find_result_bounds.y)
                return true
            } else {
                //toastLog(img_path + "小图存在但是在大图中未找到图片")
                return false
            }
        }
    } catch (error) {
        toastLog("clickAreaForFindImage方法出现错误:" + error)
        return false;
    }
}
Tools.clickRegionForFindImage=function(img_path_array, area_region, threshold,is_continue) {
    try {
        area_region = area_region || [0, 0, device.width, device.height] //默认的找图区域 全屏找图 前2位是坐标 后面是长度和宽度   千万别理解成是坐标
        threshold = threshold || 0.9 // 默认的相识度0.85
        is_continue=is_continue|| false
        if (img_path_array instanceof Array) {
            let arrayLength = img_path_array.length
            for (let i = 0; i < arrayLength; i++) {
                img_path = img_path_array[i] //小图地址可判断是否存在
                if (!files.exists(img_path)) {
                    toastLog(img_path + "文件不存在因此跳过")
                    continue
                }
                var little_image = images.read(img_path) //小图
                var find_result_bounds = images.matchTemplate(
                    captureScreen(), little_image, {
                    region: area_region,
                    threshold: threshold,
                    max: 100
                });
                if (find_result_bounds) {
                    find_result_bounds.matches.forEach(match => {
                        log(img_path+"point = " + match.point + ", similarity = " + match.similarity);
                        click(match.point.x, match.point.y)
                    });
                    if(is_continue || is_continue=="true"){
                        continue;
                    }
                    return true
                } else {
                    //toastLog(img_path + "小图存在但是在大图中未找到图片进入下一次循环...")
                }
            }
            return false
        }
        if (typeof (img_path_array) == "string") {
            img_path = img_path_array//小图地址可判断是否存在
            if (!files.exists(img_path)) {
                toastLog(img_path + "文件不存在因此跳过")
                return false
            }
            var little_image = images.read(img_path) //小图
            var find_result_bounds = images.matchTemplate(
                captureScreen(), little_image, {
                region: area_region,
                threshold: threshold,
                max: 100
            });
            toastLog(find_result_bounds)
            if (find_result_bounds) {
                //toastLog(img_path + "图找到,准备点击坐标:" + find_result_bounds)
                click(find_result_bounds.x, find_result_bounds.y)
                return true
            } else {
                //toastLog(img_path + "小图存在但是在大图中未找到图片")
                return false
            }
        }
    } catch (error) {
        toastLog("clickRegionForFindImage方法出现错误:" + error)
        return false;
    }
}

整个工程截图:

项目文件和压缩文件内容:

源代码下载地址:点淘.rar - 蓝奏云

感谢您的支持

学习知识费力气,

收集整理更不易。

知识付费甚欢喜,

为咱码农谋福利。

目录
相关文章
AutoJS4.1.0实战教程---快刷短视频
AutoJS4.1.0实战教程---快刷短视频
286 1
|
缓存 监控 前端开发
【Flutter 前端技术开发专栏】Flutter 应用的启动优化策略
【4月更文挑战第30天】本文探讨了Flutter应用启动优化策略,包括理解启动过程、资源加载优化、减少初始化工作、界面布局简化、异步初始化、预加载关键数据、性能监控分析以及案例和未来优化方向。通过这些方法,可以缩短启动时间,提升用户体验。使用Flutter DevTools等工具可助于识别和解决性能瓶颈,实现持续优化。
463 0
【Flutter 前端技术开发专栏】Flutter 应用的启动优化策略
AutoJs4.1.0实战教程---抖音极速版
AutoJs4.1.0实战教程---抖音极速版
417 0
|
JavaScript Android开发
AutoJs4.1.0实战教程---js文件打包发布成APK文件
AutoJs4.1.0实战教程---js文件打包发布成APK文件
1753 0
AutoJs4.1.0实战教程---js文件打包发布成APK文件
|
安全 云计算
身份和访问管理(IAM)软件市场现状及未来发展趋势
本文研究全球及中国市场身份和访问管理(IAM)软件现状及未来发展趋势,侧重分析全球及中国市场的主要企业,同时对比北美、欧洲、中国、日本、东南亚和印度等地区的现状及未来发展趋势
身份和访问管理(IAM)软件市场现状及未来发展趋势
|
JavaScript 定位技术 API
高德地图自定义定位 按钮
高德地图自定义定位 按钮
969 0
|
DataWorks 数据管理 大数据
DataWorks操作报错合集之如何解决表字段类型从string改为datetime报错
DataWorks是阿里云提供的一站式大数据开发与治理平台,支持数据集成、数据开发、数据服务、数据质量管理、数据安全管理等全流程数据处理。在使用DataWorks过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
|
7月前
|
传感器 存储 安全
鸿蒙开发:权限管理之权限声明
本文,主要简单概述了为什么要有权限管理,以及权限管理的声明原则,这些都是基本的概念内容,大家做为了解即可,重要的是怎么声明权限,在什么位置声明权限,这一点需要掌握。
238 16
鸿蒙开发:权限管理之权限声明
|
Kubernetes 测试技术 Perl
混沌测试平台 Chaos Mesh
混沌测试平台 Chaos Mesh
406 1
|
12月前
|
Android开发 Swift iOS开发
python 基于电脑蓝牙连接获取手机的实时数据
python 基于电脑蓝牙连接获取手机的实时数据
253 0