最近天猫双11活动,对于繁杂的浏览店铺领喵币实在是懒得动手,就写了个小脚本进行模拟。将源代码和使用教程和大家分享。
本教程为免费学习分享,文件仅供学习使用,请下载者于24小时内删除,请勿用于商业用途,如涉侵权请联系我进行删除。
先贴源代码,有js的直接在活动页面运行就可以了。现在只适配了主流了1080P分辨率的手机,如果有其他手机不支持的话多写一个if语句就可以。
auto.waitFor(); var height = device.height; var width = device.width; toast("\n设备宽" + width + "\n" + "设备高" + height + "\n" + "手机型号" + device.model + "\n安卓版本" + device.release) if (height == 1920) { //设置脚本坐标点击所适合的屏幕宽高。 setScreenMetrics(1080, 1920); toast("设备高" + height); lingqu() } else if (height == 2340) { setScreenMetrics(1080, 2340); toast("设备高"+height); lingqu() } function lingqu(){ click(547,1264);//点猫 领金币 // //浏览15秒领金币 sleep(1500); click(911,1716); sleep(1500); if(text("签到").exists()){ text("签到").findOne().click(); sleep(1600); toast("签到成功") } sleep(1500); while(text("去进店").exists()){ //要支持的动作 toast("存在去进店"); text("去进店").findOne().click(); sleep(2500); swipe(width / 2, height - 600, width / 2, 0, 500); sleep(3500); swipe(width / 2, height - 600, width / 2, 0, 500); sleep(10000); swipe(width / 2, height - 600, width / 2, 0, 500); sleep(9000); back(); sleep(1000); } while(text("去浏览").exists()){ //要支持的动作 toast("存在去浏览"); text("去浏览").findOne().click(); sleep(1500); swipe(width / 2, height - 500, width / 2, 0, 500); sleep(2500); swipe(width / 2, height - 500, width / 2, 0, 500); sleep(10000); swipe(width / 2, height - 500, width / 2, 0, 500); sleep(8000); back(); sleep(1600); } toast("结束"); }
接下来讲解使用教程,首先打开程序
点击右下角加号,导入js文件
打开左边的悬浮窗选项
在活动页面点击悬浮窗第一个按钮,运行脚本,即可自动领取喵币。
程序压缩包如下:
链接:https://pan.baidu.com/s/1KfqCgZ3wHnsmlPnH3QLWcg
提取码:7e2p
复制这段内容后打开百度网盘手机App,操作更方便哦