Automated Batch Processing for Adobe Photoshop and Illustrator
Use Adobe Photoshop and AppleScript Mac Automation Scripting to apply the same processing recipe to multiple source files in one step.
Different Files, Same Recipe
A list of the processing you want to apply to your batch defines a specification for your Photoshop batch output.
The Batch Droplet
The following AppleScript creates a sort of image carousel in Photoshop that is useful for all kinds of batch processing tasks.
(* when files are dropped on an application made from this script *) on open theFiles tell application "Adobe Photoshop CC 2017" activate repeat with theFile in theFiles (* get the name of the source folder that contains the source image *) tell application "Finder" to set theSourceFolderName to the name of the container of theFile (* set the output folder to a subfolder named for the source folder within ~/Output/ *) set theOutputFolderPath to prepOutputFolder("Output", theSourceFolderName) of me open theFile (* export iPhone icons, PNG format, width: 60, height: 60, for 3 pixel ratios, and to the output folder *) photoshopFileExport("iphone", ".png", 60, 60, 3, theOutputFolderPath) of me (* export iPad icons, PNG format, width: 76, height: 76, for 3 pixel ratios, and to the output folder *) photoshopFileExport("ipad", ".png", 76, 76, 3, theOutputFolderPath) of me close the current document saving no end repeat (* when all image files are exported *) tell application "Finder" to open folder theOutputFolderPath display notification "image files exported" with title (the name as text) subtitle (my name as text) end tell end open (* include photoshopFileExport and prepOutputFolder subroutines here *)
AppleScripts made from the example code on this page.
- to come
The blocks of example code on this page and the attached example scripts are open source software that everyone can use and modify and customize for their own purposes under MIT License.
(* Copyright 2005 Simon White http://simonwhite.com/ MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *)
Last updated .