Photoshop Automation: A Step-by-Step Guide to Effortlessly Creating Mockups with Scripts

How to Automate Photoshop Mockups Using Scripts

This guide simplifies Photoshop mockup automation into three main steps: downloading the mockup files, editing the script, and running the script in Photoshop. Start by downloading the mockup files and organizing them into separate folders for easy access. Next, use a code editor like VS Code or Sublime Text to edit the script, focusing on setting accurate file paths and correcting slashes as required. Finally, load the script in Photoshop, provide the necessary input data, and let the automation process create your mockups effortlessly. Follow these steps to streamline your workflow and save time!

Step 1: Download the Mockup Files

  •  File Details:

    • The mockup files are in PSD format.

    • Each folder contains three types of mockups: Acrylic, Brush, and Matte.

    • Each mockup type includes its automation script.

  • Organize the files in a folder structure like this:

    • Mockups (for PSD files).

    • Scripts (for the script files).

    • Output (to save the final modified mockups).


Step 2: Edit the Script

  1. Download a Code Editor:

  • Use any code editor of your choice to edit the script. While Visual Studio Code (VS Code) is a popular, free, and easy-to-use option (Download VS Code), you can also use other editors like Sublime Text (Download Sublime Text). Choose whichever editor you’re most comfortable with.

  • Click here to Download the VS code  { Download }
  • Click here to Download the SublimeText{ Download }

Open the Script in Code Editor:

  • Navigate to the folder containing the scripts.

  • Open the script file for the corresponding mockup type (e.g., Acrylic script).

Set the File Paths:

  • Copy the path of your PSD mockup file.

  • Replace backslashes (\) with forward slashes (/) in the script.

  • Paste the modified path after the specified quotation marks in the script.

  • Locate the section where you need to input the mockup file path and save the folder path.

  • Steps:

  • Do the same for the folder where you want to save the modified files.

Important Notes:

  • Ensure you add a forward slash (/) at the end of each folder path.

  • Double-check that there are no extra spaces or incorrect slashes.

  • Save your edits using Ctrl+S or the save option in VS Code.


Step 3: Run the Script in Photoshop

  1. Open Photoshop:

  • Launch Photoshop on your computer.

Load the Script:

  • Go to the menu: File > Scripts > Browse.

  • Select the script you just edited from your saved folder.

Provide Input Data:

  • Use underscores (_) instead of spaces in the name.

  • Example: Acrylic_All_Product_Size.

  • When prompted, select the folder containing the images you want to use in the mockup.

  • Specify the output file name:

Run the Automation:

  • After providing the required inputs, the script will start processing the images.

  • Photoshop will take the images from your specified folder, apply them to the mockup, and save the results in your output folder.

Check the Results:

  • Verify that the generated images appear in the output folder.

  • If there are issues, recheck the script for mistakes in file paths or naming conventions.


Final Notes:

  • Organize your files to avoid confusion.

  • Double-check file paths to ensure the script works correctly.

  • With practice, you’ll be able to automate Photoshop mockups quickly and efficiently!

Did you find this article useful?