----------------------------------------------------------------------------------
Usage: input [<source>] <command> [<arg>...]
The commands and default sources are:
text <string> (Default: touchscreen)
keyevent [--longpress] <key code number or name> ... (Default: keyboard)
tap <x> <y> (Default: touchscreen)
swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
press (Default: trackball)
roll <dx> <dy> (Default: trackball)
------------------------------------------------------------------------------------------------
- ADB模擬指標(Touch)的事件:
若觸碰螢幕的座標是(x,y)=(40,120)時,
adb shell input tap 40 120
- ADB模擬輸入字串(Text)的事件:
adb shell input text "abc@abc.com"
- ADB模擬滑頁(Swipe)的事件:
若滑動動螢幕的座標是(x,y)=(300,1200)-->(800,1200)時,
adb shell input swipe 300 1200 800 1200
----------------------------------------------------------------------------------
[Windows] cmd.exe 暫時睡眠N秒的指令: timeout /t N
----------------------------------------------------------------------------------
<Example> touch.bat:
adb devices
timeout /t 5
echo
adb shell input tap 850 1850
timeout /t 3
adb shell input swipe 850 1600 850 1300
timeout /t 5