console.show();
var time = new Date();
log(time + "\nbegin watch !!!");
toast("begin watch !!!");
slidingByCurve();
log("*****************");
for(var i = 1; i < 1000 ;i++){
log("watch it "+ i + " times")
// sleepTime 20-30 或 6-8
//sleepTime = randomRangeTime(6,8);
sleepTime = randomRangeTime(15,30);
log("watch " + sleepTime/1000 + "s");
sleep(sleepTime);
// slidingByLine();
slidingByCurve();
log("*****************");
}
log("exit...");
sleep(2000);
console.hide();
/**
* 从下往上滑动,直线滑动
*/
function slidingByLine(){
// top X,Y范围
tx = randomPointLoc(500,600);
ty = randomPointLoc(300,400);
// bottom X,Y 范围
bx = randomPointLoc(400,700);
by = randomPointLoc(1880,2000);
log("sliding ("+ bx +"," + by +"), ("+ tx +"," + ty +")")
log("X: "+ Math.abs(bx-tx) + " Y: "+ Math.abs(by - ty));
slidingTime = randomRangeTime(0.8,1.3);
swipe(bx,by ,tx ,ty ,slidingTime);
}
/**
* 从下往上滑动,
autoJs 模拟手指滑动屏幕
于 2021-11-27 12:52:35 首次发布
本文详细介绍了使用JavaScript实现的滑动效果,包括直线和曲线滑动,涉及随机位置点生成、时间间隔控制和贝塞尔曲线动画。通过函数slidingByCurve()展示了如何创建复杂的曲线滑动,并结合随机元素提升用户体验。

最低0.47元/天 解锁文章

831





