auto.js脚本自动点击屏幕双11自动领金币
发布日期:2021-06-30 11:48:19
浏览次数:2
分类:技术文章
本文共 2958 字,大约阅读时间需要 9 分钟。
auto软件和js脚本在本人的csdn的上传
js脚本操作手机屏幕的代码
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);} else if (height == 2340) { setScreenMetrics(1080, 2340); toast("设备高"+height);}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("结束");
改进版
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()}else if (height == 2160) { setScreenMetrics(1080, 2160); toast("设备高" + height); lingqu();}function lingqu() { app.launchApp("手机淘宝"); toast("打开淘宝") sleep(6000); click(600, 1235);//进入活动页 sleep(6000); 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("结束");}
转载地址:https://jackiehao.blog.csdn.net/article/details/102741612 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
逛到本站,mark一下
[***.202.152.39]2024年04月16日 17时31分07秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
Oracle 自定义函数实现split功能,支持超长字符串和clob类型的分隔
2019-04-30
Oracle 的循环中的异常捕捉和处理
2019-04-30
Oracle通过pivot和unpivot配合实现行列转换
2019-04-30
给Oracle数据库换一个1522端口的监听
2019-04-30
Excel表格数据生成ECharts图表
2019-04-30
阿里云短信服务python版,pyinstaller打包运行时缺少文件
2019-04-30
Oracle的pfile和spfile的一点理解和笔记
2019-04-30
WebService的简单案例记录(Java)
2019-04-30
Html利用PHP与MySQL交互
2019-04-30
dos简单命令
2019-04-30
mysql的安装与卸载与Navicat远程连接
2019-04-30
java实现稀疏数组及将稀疏数组存入硬盘中
2019-04-30
2021-05-18
2019-04-30
Flutter 使用插件打开相册、相机
2019-04-30
libuv实现tcp代理服务器
2019-04-30
libuv使用不当导致的内存泄漏
2019-04-30
libuv实现ping包发送和接收
2019-04-30
基础架构系列篇-CENTOS7安装NGINX
2019-04-30
基础架构系列篇-系统centos7安装docker+COMPOSE
2019-04-30