- Code: Select all
size="$(osascript -e 'Tell application "System Events" to display dialog "Size?" default answer ""' -e 'text returned of result' 2>/dev/null)"
if [ $? -ne 0 ]; then
# The user pressed Cancel
exit 1 # exit with an error status
elif [ -z "$size" ]; then
# The user left the project name blank
osascript -e 'Tell application "System Events" to display alert "You must enter a number; cancelling..." as warning'
exit 1 # exit with an error status
fi
sips -Z $size * "$1"
Any suggestions on typing the number once and once it cycles through every image it's done and resets the input.