当前位置:网站首页>Auto.js实现朋友圈自动点赞
Auto.js实现朋友圈自动点赞
2022-08-02 21:33:00 【aiguangyuan】
最近在学脚本开发,今天终于有小有所成,写了一个朋友圈自动点赞的功能,以下是代码实现,特此记录。
// 单个页面点击
function pageClick(){
// 整个页面"两点"集合
var twoDotList = id("com.tencent.mm:id/ik").find();
// 循环操作每个"两点"
twoDotList.forEach(item => {
// 点击"两点"
item.click();
// 等待"赞"出现
sleep(1500);
// 获取"赞"控件
var good = text("赞").findOnce();
if(good){
// 获取"赞"父控件
var goodParent = good.parent();
goodParent.click();
sleep(1500);
};
// 歇一会儿
sleep(1500);
});
};
// 循环整个列表
while(true){
// 页面点赞
pageClick();
sleep(2000);
// 向上翻页
className("android.widget.ListView").findOne().scrollDown();
sleep(2000);
};
边栏推荐
猜你喜欢
随机推荐
I interviewed a 985 graduate, and I will never forget the expression when answering the "performance tuning" question
VisualStudio 制作Dynamic Link Library动态链接库文件
Summary of @Transactional transaction invocation and effective scenarios
快速学会ansible的安装
[c] Detailed explanation of operators (1)
golang刷leetcode:拼接数组的最大分数
Ansible installation and configuration
【TypeScript】深入学习TypeScript模块化
同样月薪6K,为什么同事跳槽月薪翻倍,而你只涨了1000?
圆锥折射作为偏振计量工具的模拟
What is the core business model of the "advertising e-commerce" that has recently become popular in the circle of friends, and is the advertising revenue really reliable?
双轴晶体中锥形折射的建模与应用
管理工具|宝藏书签收藏管理工具
ML之PDP:基于titanic泰坦尼克是否获救二分类预测数据集利用PDP部分依赖图对RF随机森林和LightGBM模型实现可解释性案例
Redis是如何轻松实现系统秒杀的?
主成分分析(PCA)
【STM32学习2】存储器相关概念与操作
golang刷leetcode:我能赢吗
宝塔搭建实测-基于ThinkPHP5.1的wms进销存源码
How to seize the new trend of NFT, yuan|universe|universe?