/** * @author 周伟强 * @Description TODO * @date 2023/2/21 12:03 * @Copyright All rights reserved. * desc:java+ADB—循环模拟点击屏幕,解放双手 */ public class ADB { public static void main(String[] args) throws IOException, InterruptedException { /* for(int i=0;i<10;i++){ String command = "adb shell input tap 538 1188";//模拟点击屏幕坐标 Runtime run = Runtime.getRuntime(); Process p = run.exec(command); p.waitFor(); Thread.sleep(10000);//每隔100s点击屏幕 }*/ while (true){ String command = "adb shell input tap 538 1188"; Runtime run = Runtime.getRuntime(); Process p = run.exec(command); p.waitFor(); Thread.sleep(100000);//每隔100s点击屏幕 } } }
java+ADB—循环模拟点击屏幕,解放双手
最新推荐文章于 2023-07-27 16:38:07 发布