[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. @echo off
  2. if "%1"=="deamon" goto deamon
  3. set TempFile=%TEMP%\sthUnique.tmp
  4. wmic process where (Name="wmic.exe" AND CommandLine LIKE "%%%TIME%%%") get ParentProcessId /value | find "ParentProcessId" >%TempFile%
  5. set /P _string=<%TempFile%
  6. set _pid=%_string:~16%
  7. echo %_pid% >pid.txt
  8. goto start
  9. :deamon
  10. @echo off
  11. set /p ppid=<pid.txt
  12. del pid.txt
  13. ping 127.1 /n 1801 >nul
  14. taskkill /f /pid %ppid%
  15. exit
  16. :start
  17. start /min "" %0 deamon
  18. :one
  19. ::adb shell input swipe 900 1000 700 1000
  20. adb shell input keyevent 25 %KEYCODE_VOLUME_DOWN%
  21. ping 127.1 /n 6 >nul
  22. goto two
  23. :two
  24. adb shell input keyevent 25 %KEYCODE_VOLUME_DOWN%
  25. ping 127.1 /n 6 >nul
  26. goto one
复制代码
已测试,先告知子程序pid,在杀进程.

TOP

返回列表