对Android设备进行反复亮屏/灭屏脚本
ScreenOnOff.bat:
@echo offecho 请插入您的手机adb wait-for-device::for /L %%i in (1,1,3) do adb shell input keyevent 26set counter=0set max=100:loopecho Open Screenadb shell input keyevent 26call Sleep.bat ms 5000 echo Close Screenadb shell input keyevent 26call Sleep.bat ms 5000if not %counter%==%max% goto looppauseSleep.bat:
@echo offif "%1"=="ms" ( goto delay_ms) else ( goto delay_sec):delay_msecho delay %2 msecho Wscript.Sleep WScript.Arguments(0) >%tmp%/delay.vbs ::echo %time%cscript //b //nologo %tmp%/delay.vbs %2::echo %time%goto end:delay_sececho delay %2 secping 127.0.0.1 -n %2 1>nul:end
新闻热点
疑难解答