autojs每10秒向上滑动一次的脚本

swipe(device.width / 2, 2000, device.width / 2, 100, 2000);

 

do{
sleep(1000);//停个1秒 等页面滑动执行完成
//当前页面逻辑
}while(scrollForward());

 

auto();
a=device.width;
b=device.height;
while(true){
c=random(0,1);
sleep("1000");
if(c==0){
swipe(a/2,b/3*1,a/2,b/3*2,3000);
}else{
swipe(a/2,b/3*2,a/2,b/3*1,3000);
}
}

 

 

 参考这条命令【//用300毫秒的时间,从点100,100划动到点200,200
Swipe 100,100,200,200,300】
这是按键精灵app给出的一条参考命令,建议设置大一点的时间,因为按毫秒算的。

 

posted on 2020-06-02 22:28  zbl3033  阅读(14511)  评论(1编辑  收藏  举报