Created
November 21, 2017 06:58
-
-
Save yoggy/2ed1925de434c3aa2e251da6ce971dcc to your computer and use it in GitHub Desktop.
Androidでスクリーンショット撮影例.bat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem | |
rem Androidでスクリーンショット撮影例.bat | |
rem adbとImageMagickを使用 | |
rem | |
rem license: | |
rem Copyright (c) 2017 yoggy <[email protected]> | |
rem Released under the MIT license | |
rem http://opensource.org/licenses/mit-license.php; | |
rem | |
@rem ==== adbを使ってスクリーンショットを撮影 ==== | |
C:\local/android-sdk\platform-tools\adb.exe shell screencap -p //sdcard/tmp.png | |
C:\local/android-sdk\platform-tools\adb.exe pull //sdcard/tmp.png | |
C:\local/android-sdk\platform-tools\adb.exe shell rm //sdcard/tmp.png | |
"C:\Program Files\ImageMagick-7.0.7-Q16\mogrify.exe" -resize 540x tmp.png | |
@rem ==== 日付文字列を作る ==== | |
@set dt=%date% | |
@set y=%dt:~-10,4% | |
@set m=%dt:~-5,2% | |
@set d=%dt:~-2,2% | |
@set tt=%time% | |
@set hh=%tt:~0,2% | |
@set mm=%tt:~3,2% | |
@set ss=%tt:~6,2% | |
@set datestr=%y%%m%%d%-%hh%%mm%%ss% | |
@rem ==== ファイル名変更 ==== | |
move tmp.png screenshot-%datestr%.png | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment