【发布时间】:2017-11-19 12:27:19
【问题描述】:
我正在创建一个批处理文件,以便使用 ADB 轻松控制我的手机
我已经完成了大部分工作,但是我希望能够控制我的音量。
我知道adb shell input keyevent 25 减少了 1 级,但是有没有办法使用变量来执行 x 次?
所以,我目前有:
cd C:\platform-tools-latest-windows\platform-tools
cls
title DECREASING Volume
cls
echo Decreasing Volume...
adb shell input keyevent 25
pause
cls
goto :USERAREA
如果我要问用户要减少多少级,我会从:
cd C:\platform-tools-latest-windows\platform-tools
cls
title DECREASE Volume
cls
set /p VOL=How many levels should it decrease by:
pause
echo Decreasing Volume...
adb shell input keyevent 25
pause
cls
goto :USERAREA
但是,我不知道如何重复命令adb shell input keyevent 25
%VOL% 次数。
请帮帮我,
谢谢
yg.swagness
【问题讨论】:
标签: android shell batch-file