Created
February 2, 2012 22:38
-
-
Save vilcsak/1726238 to your computer and use it in GitHub Desktop.
Automate capturing screenshots of the iPhone simulator
This file contains 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
#!/bin/sh | |
# A) Run ./iphone-screenshot | |
# B) Type in the screenshot filename | |
# C) Click on the iPhone simulator | |
OUTPUTDIR=~/Desktop | |
TEMPFILE=iphone_screenshot_temp.png | |
echo "output filename:\c" | |
read -e OUTPUTFILE | |
osascript -e 'tell application "iPhone Simulator"' -e 'activate' -e 'end tell' | |
screencapture -iowW $OUTPUTDIR/$TEMPFILE | |
sips -c 960 640 $OUTPUTDIR/$TEMPFILE --out $OUTPUTDIR/$OUTPUTFILE | |
rm $OUTPUTDIR/$TEMPFILE | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment