Building Adobe Scripts
Want to start writing scripts for After Effects, Illustrator, Photoshop, or other Adobe apps? This guide will give you a clear map of the road ahead.
Adobe applications allow 3rd party tooling in three forms: scripts, extensions, and plugins. Scripts are the most simple and quick to get up and running with workflow automation. Check out our previous post for a detailed breakdown on the differences between scripts, extensions, and plugins.
Scripts are the simplest way to automate and optimize various tasks in Adobe apps and are best suited for one-time functions, and simplified user interfaces. Scripts can be used to manipulating layers, set properties, import footage, read data from files, execute renders, automate menu clicks, and so much more.
ScriptUI is an Adobe-specific addition to ExtendScript for building simple user interfaces. This comes with a collection of widgets for everyday functions including buttons, text fields, checkboxes, treeviews, and more.
Script UI is available via the Window object, not to be confused with the window object found in web browsers, these are completely different. Scripts contain code for the UI and the functionality in the same file.
While writing and debugging ExtendScript Scripts has traditionally been accomplished through the Adobe ExtendScript Toolkit (aka ESTK), that application has since been replaced with the up-to-date Visual Studio Code Extension: ExtendScript Debugger.
Files and Delivery
Script files for Adobe apps are typically stored in a single .jsx file and can be run directly in applications via the File > Script menu, or stored in the application's script folder so they can appear in menus or be docked in application layouts.
Scripts also have the option of being encrypted as binary data resulting in a .jsxbin file. JSXBIN files can be generated using the new ExtendScript VSCode extension. Encrypting your code into a .jsxbin has the added benefit of protecting your source code from the casual viewer, and if you import external libraries this process will bundle all those files into a single output file.
Now that you have a basic understanding of what scripts are and how they work, here is what you'll need in order to get started:
These are the only tools you'll need to start scripting in After Effects, Photoshop, Illustrator or any other script-compatible Adobe application.
Once you have a goal for your script, investigating the possibilities via the API is the next step.
Once you've found the needed API methods to start automating your host application, you need to build up your user interface. The ExtendScript API docs go over this in detail, however there's an even faster way to build your Script UI interfaces:
If you're looking for a course to guide you through the whole process start to finish, here are few helpful resources:
- David Torno's After Effects ExtendScript Training
- FxPHD Scripting in After Effects by Mathias Möhl
- FxPHD Introduction to After Effects Scripting by Lloyd Alvarez
Premiere Pro (Technically CEP panels):
Plenty of times you'll run into issues that you can't seem to find an answer for in the docs, in this case the community forums are a great place to turn to. These forums are very active, and chances are someone has tried to do what you're trying and can point you in the right direction.
- After Effects Scripting
- Photoshop Scripting
- Illustrator Scripting
- Animate Scripting
- InDesign Scripting
- Premiere Pro Scripting (technically CEP panels)
Have questions on getting started? Reach out to the Hyper Brew team and we'd be happy to help!