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

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

运行环境

* 本脚本使用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)endfunction doubleclick(x,y)----双击点赞  touchInputDown(x,y);  mSleep(50);  touchInputUp(x,y);  mSleep(50);  touchInputDown(x,y);  mSleep(50);  touchInputUp(x,y);  mSleep(1000);endfunction choose()----随机确定是否点赞  i = math.random(0,1);  if i==0 then    return true  else    return false  endendflag = runApp("com.smile.gifmaker")----开启软件mSleep(5*1000)if r==1 then  toast("启动失败");   mSleep(3000);  lua_exit();  mSleep(1000);endfor i=0,10,1 do  slip(-700);  mSleep(1000);  if choose() then    doubleclick(500,500)  endendcloseApp("com.smile.gifmaker")----1080*1920

总结

  1. 截取全屏
local w,h = getDisplaySize()dialog(w..":"..h)snapshot("test.png",0,0,w,h
  1. touchMove()函数失效,只能翻动评论
计算机