快手自動視頻隨機點贊腳本


本文當筆記用的,此腳本啥比用

運行環境

* 本腳本使用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()函數失效,只能翻動評論


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM