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.

83 lines
1.8 KiB

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.

toast("hello")
function openBCZ() {
// 打开手机 App
app.launchApp('小红书');
sleep(2500); // 等待应用加载
function shang() {
var randomP = random(500, 600);
var points = [randomP];
var interval = 0.1;
var x0 = random(780, 900);
var y0 = random(1500, 1600);
var a = 120;
for (var t = 0; t < Math.PI / 2; t += interval) {
// 修改y坐标的计算使得轨迹向下滑动
var x = x0 - a * (1.8 * Math.cos(t * 0.9) - Math.cos(2 * t * 0.9));
var y = y0 + a * (5 * Math.sin(t * 0.9) - Math.sin(2 * t * 0.9)); // 注意这里的加号
points.push([parseInt(x), parseInt(y)]);
}
gesture.apply(null, points);
sleep(2500);
}
shang()
let screenWidth = device.width;
let screenHeight = device.height;
click("直播")
sleep(2000)
click(1000, 1200)
sleep(2000)
while(1){
click("关注")
sleep(1000)
click(500,500);
click(500,500);
sleep(100)
sleep(2000)
function xia() {
var randomP = random(500, 600);
var points = [randomP];
var interval = 0.1;
var x0 = random(780, 900);
var y0 = random(1500, 1600);
var a = 120;
for (var t = 0; t < Math.PI / 2; t += interval) {
var x = x0 - a * (1.8 * Math.cos(t * 0.9) - Math.cos(2 * t * 0.9));
var y = y0 - a * (5 * Math.sin(t * 0.9) - Math.sin(2 * t * 0.9));
points.push([parseInt(x), parseInt(y)]);
}
gesture.apply(null, points);
sleep(2500);
}
xia()
sleep(1000)
}
// }
}
auto.waitFor();
openBCZ();