Android截屏,录视频批处理脚本

echo off
goto choice
:choice
  set /p cnum=请输入1(截屏)2(录屏): 
  echo %cnum%
if %cnum% == 1 (goto screencap) else ( if %cnum% == 2 (goto screenrecord) else (goto another))
:screencap
  rem 选择截屏操作
  set "a=%date:~0,4%.%date:~5,2%.%date:~8,2%.%time:~0,2%.%time:~3,2%.%time:~6,2%.%time:~9,2%" 
  set "filepng=filepng%a%.png"
  set "location=%cd%"
  adb shell /system/bin/screencap -p /sdcard/%filepng%
  adb pull /sdcard/%filepng% %location%
  goto choice
  exit
:screenrecord
  rem 选择录屏操作
  set "a=%date:~0,4%.%date:~5,2%.%date:~8,2%.%time:~0,2%.%time:~3,2%.%time:~6,2%.%time:~9,2%"  
  set "filemp4=screenshot%a%.mp4"
  set "location=%cd%"
  set /p m=录制几秒?:
  adb shell screenrecord  --time-limit %m% /sdcard/%filemp4%
  adb pull /sdcard/%filemp4% %location%
  goto choice
  exit 
:another
  goto choice
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容