当前位置:   article > 正文

电脑使用adb实现模拟手机点击_adb 模拟点击

adb 模拟点击

adb发送模拟手机点击

adb shell input tap x y

脚本完整代码实现点击

  1. @ echo chcp 65001
  2. @ echo off
  3. set position=1
  4. set count=1
  5. adb shell wm size
  6. :loop
  7. set dateY=%date:~0,4%
  8. set dateM=%date:~5,2%
  9. set dateD=%date:~8,2%
  10. set dateHour=%time:~0,2%
  11. set dateMinutes=%time:~3,2%
  12. set dateSeconds=%time:~6,2%
  13. if %dateHour% LSS 10 (
  14. set dateHour=0%time:~1,1%
  15. )
  16. set printTime=%dateY%_%dateM%_%dateD%_%dateHour%_%dateMinutes%_%dateSeconds%
  17. set /a count+=1
  18. echo count = %count% , current position = %position% , %printTime%
  19. if %position%==1 (
  20. echo adb shell input tap 200 400
  21. adb shell input tap 200 400
  22. set position=2
  23. ) else (
  24. echo adb shell input tap 400 400
  25. adb shell input tap 400 400
  26. set position=1
  27. )
  28. Wscript sleep.vbs 1000
  29. goto loop
  30. pause

vbs休眠

文件:sleep.vbs

内容:WScript.sleep 5000 
 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/56404
推荐阅读
相关标签
  

闽ICP备14008679号