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.

31 lines
966 B

This file contains ambiguous Unicode 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.

// 初始化
app.launchApp("小红书");
sleep(3000); // 等待应用启动,根据设备性能调整时间
click("直播");
sleep(3000);
click(500,1000);
sleep(5000);
// 定义上滑的起点和终点坐标
// 这些坐标应该根据你的设备屏幕和小红书应用的UI布局来确定
var startX = 300; // 起点X坐标
var startY = 1500; // 起点Y坐标较高的位置
var endX = 300; // 终点X坐标与起点相同实现垂直滑动
var endY = 500; // 终点Y坐标较低的位置
// 定义滑动的持续时间(毫秒)
var duration = 500; // 滑动持续时间,可以根据需要调整
// 无限循环,每隔三秒执行一次上滑操作
while (true) {
sleep(2000);
click("关注");
sleep(1000);
click(500,1000);
sleep(100);
click(500,1000);
sleep(500);
swipe(startX, startY, endX, endY, duration);
sleep(1000);
}