You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
2.4 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

function xhs()
{
    launchApp("小红书");
    sleep(2000);
}
function zb()
{
    click("发现");
    sleep(1000);
    shell("am start xhsdiscover://home/explore");
    sleep(1000);
    click("直播");
    sleep(1000);
    click(500, 800);
    sleep(1000); // 等待直播界面加载
}
function pl(){
    click(200, 2250);
    var editText = className("android.widget.EditText").findOne();
    if (editText) {
        editText.setText("我来点赞啦");
        //sleep(2000); // 等待文本输入完成
    }
    sleep(2000); // 等待文本输入完成
    var postButton = className("android.widget.Button").text("发送").findOne();
    if (postButton) {
        postButton.click();
        sleep(2000); // 等待发送完成
    }else {
        log("未找到发送按钮");
    }
}
function dz()
{
    var numberOfLikes = 10; // 设置点赞次数
    for (var i = 0; i < numberOfLikes; i++) {
        // 第一次点击
        click(700, 800);
        // 第二次点击
        click(700, 800);
        sleep(200); // 等待一段时间再进行下一次点赞
    }
   
}
function sh()
{
    swipe(500, 1500, 500, 500, 200);
}
function ft()
{
    click(600,2280);
    sleep(2000);
    click("文字");
    sleep(1000);
    click(500,800);
    sleep(1000);
    var editText = className("android.widget.EditText").findOne();
    if (editText) {
        editText.setText("这是一条帖子from 厦门探斯克)");
        //sleep(2000); // 等待文本输入完成
    }
    sleep(1000); // 等待文本输入完成
    click("下一步");
    sleep(4000);
    click("下一步");
    sleep(1000);
    click("发布笔记");
}
function xz()
{
    var id=dialogs.singleChoice("请选择功能",["打开小红书","上划","打开直播","评论","点赞","发帖"],0 );
    if(id==0)
    {
        sleep(500);
        xhs();
    }
    if(id==1)
    {
        sleep(500);
        sh();
    }
    if(id==2)
    {
        sleep(500);
        zb();
    }
    if(id==3)
    {
        sleep(500);
        pl();
    }
    if(id==4)
    {
        sleep(500);
        dz();
    }
    if(id==5)
    {
        sleep(500);
        ft();
    }
}
xz();
//xhs();
//sh();
//zb();
//pl();
//dz();
//ft();