快手自动视频随机点赞脚本

本文当笔记用的,此脚本啥比用

运行环境

* 本脚本使用lua编写,运行于触动精灵平台
* 手机需要root,模拟器不需要
* 平台搭建[跳转](https://www.cnblogs.com/freeyouth/p/11685087.html)
function slip(d)----从下到上滑动手机屏幕
  toast("滑动");
  w , h = 400,1100;
  os.execute("input mouse swipe "..w.." "..h.." "..w.." "..h+d)
end

function doubleclick(x,y)----双击点赞
  touchInputDown(x,y);
  mSleep(50);
  touchInputUp(x,y);
  mSleep(50);
  touchInputDown(x,y);
  mSleep(50);
  touchInputUp(x,y);
  mSleep(1000);
end

function choose()----随机确定是否点赞
  i = math.random(0,1);
  if i==0 then
    return true
  else
    return false
  end
end

flag = runApp("com.smile.gifmaker")----开启软件
mSleep(5*1000)
if r==1 then
  toast("启动失败"); 
  mSleep(3000);
  lua_exit();
  mSleep(1000);
end

for i=0,10,1 do
  slip(-700);
  mSleep(1000);
  if choose() then
    doubleclick(500,500)
  end
end
closeApp("com.smile.gifmaker")
----1080*1920

总结

  • 截取全屏
local w,h = getDisplaySize()
dialog(w..":"..h)
snapshot("test.png",0,0,w,h
  • touchMove()函数失效,只能翻动评论
posted @ 2019-10-20 20:58  坏人不会飞  阅读(2976)  评论(0编辑  收藏  举报