查看: 792|回复: 0

auto.js抖音极速版自动刷视频

[复制链接]

748

主题

39

回帖

3907

积分

管理员

总舵主

积分
3907
QQ
发表于 2024-5-26 13:04:05 | 显示全部楼层 |阅读模式
  1. auto.waitFor();
  2. app.launchApp('抖音极速版')
  3. sleep(4000);
  4. youngWin();
  5. newVersion()
  6. i = 1;
  7. while (true) {
  8.     toast("滑动" + i + '次')
  9.     WidthOne = random(300, 800);
  10.     HeightOne = random(1600, 1800);
  11.     WidthTwo = random(300, 800);
  12.     HeightTwo = random(500, 700);
  13.     timeGo = random(250, 600);
  14.     timeNext = random(4000, 7000);
  15.     heartClick();
  16.     swipe(WidthOne, HeightOne, WidthTwo, HeightTwo, timeGo);
  17.     sleep(timeNext);
  18.     i++;
  19. }

  20. /**如果弹出青少年窗口,点击 */
  21. function youngWin() {
  22.     if (youngWin = text("我知道了").exists()) {
  23.         youngWin.click();
  24.     };
  25. }

  26. /**随机点赞并休息一秒 */
  27. function heartClick() {
  28.     index = random(1, 5);
  29.     if (index == 3) {
  30.         id('a4o').findOnce().click();
  31.     }
  32.     sleep(1000);
  33. }

  34. //检测到新版本跳过
  35. function newVersion() {
  36.     if (newVersion = text("以后再说").exists()) {
  37.         newVersion.click();
  38.     };
  39. }

  40. /**
  41. * 自动提交评论
  42. * content str 评论内容,默认为666
  43. */
  44. function autoComment(content = "666") {
  45.     id('pz').findOnce().click();
  46.     sleep(1000);
  47.     b = id('pz').findOnce().bounds();
  48.     sleep(1000);
  49.     click(b.centerX(), b.centerY());
  50.     sleep(1000);
  51.     setText(content);
  52.     sleep(1000);
  53.     click(b.centerX(), b.centerY());
  54.     sleep(1000);
  55.     click(device.width - 80, b.centerY());
  56.     sleep(1000);
  57.     back();
  58. }
复制代码

https://www.cnblogs.com/qinsilandiao/p/12128720.html
道不同,不相为谋!理想要有,万一实现了呢?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:2513533699@qq.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|鲁ICP备19000917号|鲁公网安备37078302000320号

在本版发帖
关注公众号
QQ客服返回顶部