AutoJS4.1.0实战教程 ---快音

简介: AutoJS4.1.0实战教程 ---快音

,推荐给大家比较稳定,就是不FHY

auto.waitFor();
app.launchApp('快音');
sleep(5000);
console.show();
i = 1;
if(className("android.widget.TextView").text("视频").exists())
{
    console.info("点击,视频");
    let video= className("android.widget.TextView").text("视频").findOnce();
    let b = video.bounds();
    click(b.centerX(), b.centerY());
}
let see_count=500;
while (true) {
    toast("快音滑动" + i + '次'+"总计:"+ see_count + "次")
    console.log("快音滑动" + i + '次'+"总计:"+ see_count + "次");
    randomUpSildeScreen();
    randomDownSildeScreen();
    randomHeart();
    randomFollow();
    slideScreenDown(303, 1328, 335, 171, 600);
    i++;
    if(i==500){
        exit();
        home();
    }
}
/**
 * 屏幕向下滑动并延迟8至12秒
 */
function slideScreenDown(startX, startY, endX, endY, pressTime) {
    swipe(startX, startY, endX, endY, pressTime);
    let delayTime = random(8000, 12000);
    sleep(delayTime);
}
/**
 * 随机上滑(防止被判定是机器)上滑后停留时间至少是10S,造成假象表示是对内容感兴趣
 * 点赞和关注先不搞。
 */
function randomUpSildeScreen(){
    let randomIndex = random(1, 40);
    if(randomIndex==1){
        console.log("随机上滑被执行了");
        pressTime = random(200, 500);
        swipe(device.width / 2, 500, device.width / 2, device.height-200, 700);
        delayTime = random(10000, 15000);
        sleep(delayTime);
    }
}
/**
 * 连续下滑对上一个无兴趣
 * 其实得和上滑做个排他,既然无兴趣不要在上滑
 */
function randomDownSildeScreen(){
    let randomIndex = random(1, 20);
    if(randomIndex==1){
        console.log("连续下滑被执行了");
        swipe(device.width / 2, device.height-200, device.width / 2, 500, 700);
        sleep(2000);
        swipe(device.width / 2, device.height-200, device.width / 2, 500, 700);
        delayTime = random(8000, 10000);
        sleep(delayTime);
    }
}
/**随机点赞并休息一秒 */
function randomHeart() {
    index = random(1, 100);
    if (index == 66) {
        var target = id('ob').findOnce();
        if (target == null){
            return;
        } else {
            target.click();
            sleep(1000);
        }
    }
}
function randomFollow() {
    index = random(1, 100);
    if (index == 66) {
        var target = id('ov').findOnce();
        if (target == null) {
            return;
        } else {
            target.click();
            sleep(1000);
        }
    }
}

 

目录
相关文章
|
4月前
AutoJS4.1.0实战教程 ---七猫免费小说
AutoJS4.1.0实战教程 ---七猫免费小说
39 0
|
4月前
AutoJS4.1.0实战教程 ---彩蛋视频
AutoJS4.1.0实战教程 ---彩蛋视频
25 0
|
4月前
AutoJS4.1.0实战教程 ---百度极速版
AutoJS4.1.0实战教程 ---百度极速版
64 0
|
4月前
|
缓存
Autojs4.1.0实战教程---彩蛋视频功能合集
Autojs4.1.0实战教程---彩蛋视频功能合集
27 0
|
4月前
AutoJS4.1.0实战教程 ---疯读小说
AutoJS4.1.0实战教程 ---疯读小说
26 0
|
4月前
AutoJs4.1.0实战教程---抖音极速版
AutoJs4.1.0实战教程---抖音极速版
82 0
|
4月前
AutoJS4.1.0实战教程 ---步多多
AutoJS4.1.0实战教程 ---步多多
15 0
|
4月前
Autojs4.1.0实战教程---中青看点
Autojs4.1.0实战教程---中青看点
37 0
|
4月前
AutoJS4.1.0实战教程---快刷短视频
AutoJS4.1.0实战教程---快刷短视频
25 1
|
4月前
|
JavaScript 数据安全/隐私保护 Android开发
AutoJs4.1.0实战教程---源码大放送
AutoJs4.1.0实战教程---源码大放送
49 0

相关实验场景

更多