Automate Photoshop with scripts

Last updated on Oct 4, 2026

Learn how to use JavaScript to automate repetitive tasks and trigger actions based on application events in Adobe Photoshop on desktop.

Scripts let you automate Photoshop tasks with code rather than manual steps. You can run scripts or configure them to run automatically when specific events occur, like opening, saving, or exporting a file. If you prefer visual automation without coding, record actions instead.

Photoshop supports JavaScript (.js or .jsx files), which works on both Windows and macOS. VBScript (Windows) and AppleScript (macOS) are also supported, but work only on their respective platforms. For modern script development, use the UXP scripting framework.

Save scripts to the Photoshop application folder under Presets > Scripts to make them appear in the File menu.

Run a JavaScript file

Select File > Scripts.

Choose a script from the list to run files stored in the Presets > Scripts folder.

Select File > Scripts > Browse to navigate to and run a script saved in a different location.

Configure automatic script and action triggers

Select File > Scripts > Script Events Manager.

Select the Enable Events To Run Scripts/Actions checkbox.

Choose the triggering event from the Photoshop Event menu, such as Open Document, Save Document, or Export Document.

Select either Script or Action, then choose which script or action to run when the event occurs.

Select Browse if choosing a script not included in the default list, then navigate to your script file.

For actions, choose the action set from the first menu, then select the specific action from the second menu.

Select Add to register the event-script pairing in the active events list.

Repeat to configure additional event triggers as needed.

Load action sets through Window > Actions before configuring event triggers in the Script Events Manager. To temporarily turn off all event triggers without deleting your configurations, deselect Enable Events To Run Scripts/Actions in the Script Events Manager. To remove an individual event trigger, select the event from the list, then select Remove.