★立即注册★

QQ登录

只需一步,快速开始

就爱江湖-应用库-技术分享资源网-Www.92Jh.Cn

查看: 491|回复: 0

[Windows] 淘宝双十二集能量脚本

[复制链接]
发表于 2019-12-1 17:13:53 | 显示全部楼层
搬运其他论坛的, 本来想等一下的, 但是一直没有人发...

auto.js 软件下载: https://www.lanzouu.com/i7rl8eh

活动在首页, 集图赢大金条

代码:
  1. var height = device.height;
  2. var width = device.width;
  3.      
  4. if (text("签到").exists()) {        
  5.     text("签到").findOne().click();        
  6.     sleep(1600);        
  7.     toast("签到成功")   
  8. }   
  9. sleep(1500);  

  10. while (textContains("去浏览").exists()) {        
  11.     toast("存在去浏览");
  12.     textContains("去浏览").find().forEach(function(o) {        
  13.         text_str = o.text()
  14.         text_str = text_str.match(/\d+\/\d+/g).join()
  15.         click_cnt = parseInt(text_str.match(/\d+/g));
  16.         goal_cnt = parseInt(text_str.match(/\/\d+/g).join().replace("/", ""));
  17.         log(click_cnt, goal_cnt)
  18.         if (click_cnt != goal_cnt) {
  19.             toast("找到了");
  20.             o.click();        
  21.             sleep(1500);        
  22.             swipe(width / 2, height - 500, width / 2, 0, 500);        
  23.             sleep(2500);        
  24.             swipe(width / 2, height - 500, width / 2, 0, 500);        
  25.             sleep(10000);        
  26.             swipe(width / 2, height - 500, width / 2, 0, 500);        
  27.             sleep(8000);        
  28.             back();        
  29.             sleep(1500);
  30.         }
  31.     })   
  32. }   

  33. while (textContains("去搜索").exists()) {        
  34.     toast("存在去浏览");
  35.     textContains("去搜索").find().forEach(function(o) {        
  36.         text_str = o.text()
  37.         text_str = text_str.match(/\d+\/\d+/g).join()
  38.         click_cnt = parseInt(text_str.match(/\d+/g));
  39.         goal_cnt = parseInt(text_str.match(/\/\d+/g).join().replace("/", ""));
  40.         log(click_cnt, goal_cnt)
  41.         if (click_cnt != goal_cnt) {
  42.             toast("找到了");
  43.             o.click();        
  44.             sleep(1500);        
  45.             swipe(width / 2, height - 500, width / 2, 0, 500);        
  46.             sleep(2500);        
  47.             swipe(width / 2, height - 500, width / 2, 0, 500);        
  48.             sleep(10000);        
  49.             swipe(width / 2, height - 500, width / 2, 0, 500);        
  50.             sleep(8000);        
  51.             back();        
  52.             sleep(1500);
  53.         }
  54.     })   
  55. }   
  56. toast("请在能量中心开始运行,需要自行开始和停止脚本");
复制代码
如果发现上面代码不好用, 可以用下面这个:
  1. auto.waitFor();
  2. var height = device.height;
  3. var width = device.width;
  4. var model = device.model;
  5. var android = device.release;
  6. var i;
  7. toast("手机型号:" + model + "\n安卓版本:" + android + "\n屏幕宽:" + width + "\n" + "屏幕高:" + height + "\nBy:Summerlotus" + "\n")
  8. sleep(2000);
  9. //设置脚本坐标点击所适合的屏幕宽高;请根据自己屏幕来决定
  10. if (width == 1080)
  11. {
  12.     setScreenMetrics(1080, height);
  13.     toast("你的设备屏幕参数设定为:" + height + "*" + width);
  14.     jintiao()
  15. }
  16. //如不能执行成功,请更改上述脚本为如下脚本
  17. //并修改成你手机屏幕的对应参数
  18. /*
  19. if (height == 1920)//替换1920->你手机屏幕参数
  20. {
  21.     setScreenMetrics(1080, 1920);//替换分辨率你手机屏幕参数
  22.     toast("你的设备屏幕参数设定为:" + height + "*" + width);
  23.     miaomiao()
  24. }
  25. */

  26. function jintiao()
  27. {
  28.          sleep(1600);
  29. click(960,1630);

  30.         sleep(1500);
  31.         if(textEndsWith("签到").exists())
  32.         {
  33.                 textEndsWith("签到").click();
  34.                 sleep(1600);
  35.                 toast("签到成功")
  36.         }
  37.         sleep(1500);
  38.         //循环判断是否有新任务
  39.         while(textEndsWith("去浏览").exists())
  40.         {
  41.     //toast("in");
  42.                         toast("任务-去浏览-");
  43. sleep(1500);
  44. textEndsWith("去浏览").click();
  45.                         sleep(1500);
  46.                         swipe(width / 2, height - 500, width / 2, 0, 500);
  47.                         sleep(2500);
  48.                         swipe(width / 2, height - 500, width / 2, 0, 500);
  49.                         sleep(10000);
  50.                         swipe(width / 2, height - 500, width / 2, 0, 500);
  51.                         sleep(5000);
  52.                         back();
  53.                         sleep(1600);
  54.         }
  55.         sleep(1000);
  56.         toast("如发现仍有新任务请重新运行脚本~");
  57.         sleep(3000);
  58.         toast("本次运行结束~");
  59. }
复制代码
使用方法:
打开auto.js.apk, 会提示设置无障碍, 直接去把无障碍开启就好
然后点击右下角的 + 号, 选择文件, 新建一个文件, 把代码复制进去.
点击左上角的侧边栏, 确定无障碍服务以及悬浮窗为开启状态.

打开淘宝全民寻宝活动界面, 运行脚本
到充能量中心运行脚本


上一篇:【酷Q】QQ一键签到机器人插件V1.1
下一篇:百度网盘提取直链突破限速

发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案,如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请在帖子回复【已解决】。

游客
回复
您需要登录后才可以回帖 登录 | ★立即注册★

免责声明
就爱江湖所发布的一切软件逆向解密分析文章及视频、破解补丁、注册机和注册信息,仅限用于学习和研究目的。不得将上述内容用于商业或者非法途径!否则,一切后果请用户自负!
本站信息来自互联网,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请购买注册正版软件,获得正版优质服务!
如有侵权请邮件或QQ与我们联系处理。

联系QQ:2710763
邮箱:2710763@qq.com

手机版|小黑屋| 就爱江湖资源分享网 ( 粤ICP备2025451632号 ) |网站地图

GMT+8, 2025-8-4 06:26

Powered by Discuz!

© 2001-2020 Comsenz Inc.

快速回复 返回顶部 返回列表