A professional collection of Adobe Creative Cloud automation scripts written in ExtendScript (.jsx) — the ES3-based scripting language built into Adobe InDesign, Illustrator, Photoshop, and other CC applications.
jsx-scripts/
├── .vscode/
│ └── settings.json # Workspace settings for ExtendScript in VS Code
├── src/
│ ├── indesign/ # InDesign-specific scripts
│ │ ├── Boilerplate.jsx # Starter template for new InDesign scripts
│ │ └── ExportPDFs.jsx # Batch-export open documents as PDFs
│ ├── illustrator/ # Illustrator-specific scripts (add yours here)
│ └── shared/ # Cross-app utilities
│ └── utils.jsx # Logging (writeLog) and helper (getScriptFolder)
├── .eslintrc.json # ESLint config — enforces ES3 / ExtendScript rules
├── jsconfig.json # VS Code IntelliSense for Adobe types
├── package.json # Dev dependencies (eslint, types-for-adobe)
├── .gitignore
└── README.md
These .jsx files can be run directly from InDesign's Scripts Panel. Follow these steps to install them permanently:
-
Open the Scripts Panel in InDesign:
Window → Utilities → Scripts -
Reveal the User Scripts folder on disk:
- In the Scripts Panel, right-click (Windows) or Control-click (macOS) the User folder.
- Select Reveal in Explorer (Windows) or Reveal in Finder (macOS).
- This opens the folder:
.../Adobe InDesign/Scripts/Scripts Panel/
-
Copy the script files from this repository into that folder:
- You can copy individual
.jsxfiles, or create a sub-folder (e.g.My Scripts/) and drop them inside. - Example: copy
src/indesign/ExportPDFs.jsxinto the Scripts Panel folder.
- You can copy individual
-
Run a script — it now appears in the Scripts Panel. Double-click it to execute.
Tip: You can also run any
.jsxfile on-the-fly viaFile → Scripts → Browse…in InDesign without permanently installing it.
The dev tooling provides ES3 linting and Adobe API autocomplete inside VS Code.
- Node.js (v14 or later)
- VS Code
- ESLint VS Code extension
# 1. Clone the repository
git clone https://github.com/cwhit-io/jsx-scripts.git
cd jsx-scripts
# 2. Install dev dependencies (types-for-adobe + eslint)
npm installAfter running npm install, VS Code will automatically use the types-for-adobe type definitions specified in jsconfig.json. You will get IntelliSense for objects like app.documents, app.activeDocument, TextFrame, etc.
# Lint all .jsx source files
npm run lintThe .eslintrc.json is configured to enforce ES3-compatible code — it will warn or error if you accidentally use let, const, arrow functions, template literals, or other modern JS features that are not supported by ExtendScript.
All .jsx files in this repository follow these rules to stay ES3-compliant and safe:
| Rule | Correct | Avoid |
|---|---|---|
| Variable declarations | var x = 1; |
let x = 1; / const x = 1; |
| Functions | function foo() {} or var foo = function() {} |
Arrow functions () => {} |
| Strings | "hello " + name |
Template literals `hello ${name}` |
| Scope protection | Wrap scripts in an IIFE (function(){ ... })(); |
Top-level code |
| Shared code | Namespace objects var MyUtils = { ... } |
ES6 modules / import / export |
Shared utilities included by other scripts via #include:
MyUtils.writeLog(message)— Appends a timestamped entry to~/Desktop/adobe-scripts.log.MyUtils.getScriptFolder()— Returns theFolderof the currently running script.
A minimal starter script. Checks whether a document is open and logs the document name. Use this as a template when writing new InDesign scripts.
Batch-exports all currently open InDesign documents as press-quality PDFs to a user-selected folder.
- Fork the repository.
- Create a feature branch:
git checkout -b feature/my-new-script - Write your script in the appropriate
src/<app>/folder, following the ES3 conventions above. - Run
npm run lintto validate your code. - Open a Pull Request.
MIT