Skip to content

Instantly share code, notes, and snippets.

@myfreeer
Created July 4, 2017 14:33
Show Gist options
  • Save myfreeer/e17506004fd8bc24e0ec3c8bcb4215ea to your computer and use it in GitHub Desktop.
Save myfreeer/e17506004fd8bc24e0ec3c8bcb4215ea to your computer and use it in GitHub Desktop.
@echo off
setlocal EnableExtensions EnableDelayedExpansion
echo. Batch DPI Modifier for Photoshop
echo. Required a sendinput.exe from https://github.com/myfreeer/sendinput/releases/latest
echo.
:Num
set /p "num=Enter Number of Files:"
if "%num%"=="" goto :Num
echo.
:Dpi
set /p "dpi=Enter Target DPI:"
if "%dpi%"=="" goto :Dpi
echo.
echo. Press any key and switch window to ps with all file opened in 2 secs.
pause
start /wait sendinput ${SLEEP 2000}
for /l %i in (1,1,%num%) do start /wait sendinput ${SLEEP 1000}${CTRL+ALT+i}${SLEEP 300}${TAB}${UP}${UP}${SLEEP 300}${TAB}100${TAB}${TAB}${SLEEP 300}%dpi%${SLEEP 300}${ENTER}${SLEEP 1000}${CTRL+S}${SLEEP 1000}${CTRL+w}${SLEEP 600}
echo. Done.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment