- @echo off
- if "%1"=="deamon" goto deamon
- set TempFile=%TEMP%\sthUnique.tmp
- wmic process where (Name="wmic.exe" AND CommandLine LIKE "%%%TIME%%%") get ParentProcessId /value | find "ParentProcessId" >%TempFile%
- set /P _string=<%TempFile%
- set _pid=%_string:~16%
- echo %_pid% >pid.txt
- goto start
- :deamon
- @echo off
- set /p ppid=<pid.txt
- del pid.txt
- ping 127.1 /n 1801 >nul
- taskkill /f /pid %ppid%
- exit
- :start
- start /min "" %0 deamon
- :one
- ::adb shell input swipe 900 1000 700 1000
- adb shell input keyevent 25 %KEYCODE_VOLUME_DOWN%
- ping 127.1 /n 6 >nul
- goto two
-
- :two
- adb shell input keyevent 25 %KEYCODE_VOLUME_DOWN%
- ping 127.1 /n 6 >nul
- goto one
复制代码 已测试,先告知子程序pid,在杀进程. |