1 Star 12 Fork 13

idouq/Autojs

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
获取直播间评论.js 935 Bytes
Copy Edit Raw Blame History
idouq authored 2021-02-22 20:43 . 获取直播间评论.js.
var jihe = [];
while (true) {
sleep(200);
if (textMatches("小时榜|小时榜.*|说点什么.*|.*本场点赞").exists()) {
var uc = textMatches(".+:.+").visibleToUser().find();
for (i = 0; i < uc.length; i++) {
var result = false;
var a = uc[i].text();
str1 = a;
for (k = 0; k < jihe.length; k++) {
if (jihe[k] == str1) {
result = true;
break; //判断如果重复就跳出
}
}
if (jihe.length >= 10) {
//为了防止同一个人后面发送的相同内容无法记录,这里自动清除数组中第一个元素
jihe.shift();
}
if (result == false) {
jihe.push(str1);//加入数组
log("获取数据:" + str1)
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/idouq/Autojs.git
git@gitee.com:idouq/Autojs.git
idouq
Autojs
Autojs
master

Search