Script runner for Adobe applications right from VSCode. Extension available for Atom.io, Sublime Text and VSCode.
Run commands are accessible via Command Palette
. Simply click F1
or Cmd+Shift+P
and start typing the name of supported applications
. Click enter to run the script inside the selected application.
The extension will open host application first if it's not running, and then execute the script.
Tip: You don't need to have the file saved inside VSCode. The extension will be able to run code from unsaved documents.
Map keyboard shortcuts to execute a script even faster - Cmd+R
is bind to run a script inside After Effects by default. Read how to change it in Key bindings.
Adobe Script Runner executes script in the active viewer by default. However, when working with multi-file scripts, it is common to set a path to execute a master file, i.e index.js
, from within a file that's in the active view. Such behavior can be modified using Token or setting up execute this file in the settings.
Extensions
and type Adobe Script Runner
.Install
and then Reload
button.VSCode-Adobe-Script-Runner-master
to /Users/YOURUSER/.vscode/extensions
folder.alert("Hello World");
.Cmd+R
on Mac or Ctrl+R
on Windows, or launch Command Palette
with keyboard shortcut F1
or Cmd+Shift+P
, and type Adobe After Effects
and click enter.Keyboard shortcut Cmd+R
is bind to adobeScriptRunner.ae
command, which will run a script inside Adobe After Effects. To change the command or assign a different shortcut, do the following:
keybindings.json
.keybindings.json
file where you can overwrite the default bindings on the right.keybindings.json
in focus click Cmd+K
twice to open an interactive keybinding modal window (or whatever it’s called) and follow the on-screen instructions. This will create a new binding entry in the keybindings.json
file.command
property to adobeScriptRunner.XX
, where XX is an abbreviation of the application. Check available abbreviations in Extensions > Adobe Script Runner > Contributions
tab.The result should look something like this:
{
"key": "cmd+r",
"command": "adobeScriptRunner.ae",
"when": "editorTextFocus"
},
For more information about keybinding check official Key Bindings for Visual Studio Code.
Use token to execute a different file, rather than the one in the viewer. Add Adobe-script-runner "path/to/file.jsx"
at the beginning of the file in the active document to always execute the file between quotes.
/*
Adobe-script-runner '../../index.js'
Executes file between quotes rather than the one in the active viewer.
*/
alert('Hello World'); // This line never gets executed, unless `index.js` is referencing the file in viewer.
The file path gets resolved by joining the path of the file in the viewer and the file within the quotes.
Use this option to set-up a path to a file to execute always, ignoring the file in the viewer, globally or per-project basis. To do so, open settings (Cmd+,
on Mac or Ctrl+,
on Windows) and set the path to a file in Extensions -> Adobe Script Runner -> Execute This.
The file path gets resolved by joining this path and the Workspace (or Root /
) folder.
Click Cmd+,
on Mac or Ctrl+,
on Windows to modify settings. Extension exposes the following API:
adobeScriptRunner.executeFileFromConfig
: Whether to execute file, defined in config .vscode/settings.json
file. See more in Execute this section.adobeScriptRunner.executeFileFromToken
: Whether to search for Adobe-Script-Runner "path/to/file.jsx"
token in active document, and execute file within the quotes. See more in Token section.adobeScriptRunner.executeThis
: A path to a file to execute always, ignoring the file in the viewer, globally or per-project basis. See more in Execute this section.adobeScriptRunner.saveFileBeforeExecution
: Whether to save file before execution.adobeScriptRunner.temporaryFile
: Path to a temporary file where Untitled document gets saved prior to execution.For Mac users only:
adobeScriptRunner.bringHostApplicationToFront
: Whether to bring the host application to the front. If this option is turned off, then the debug console prints 1
if there were execution errors, otherwise 0
.For Windows users only:
adobeScriptRunner.winAfterEffectsExe
: path to Adobe After Effects executable (AfterFX.exe).adobeScriptRunner.winAfterEffectsBetaExe
: path to Adobe After Effects (Beta) executable (AfterFX (Beta).exe).adobeScriptRunner.winExtendscriptToolkitExe
: path to Adobe ExtendScript Toolkit executable (ExtendScript Toolkit.exe).adobeScriptRunner.winIllustratorExe
: path to Adobe Illustrator executable (Illustrator.exe).adobeScriptRunner.winIllustratorBetaExe
: path to Adobe Illustrator (Beta) executable (Illustrator.exe).adobeScriptRunner.winPhotoshopExe
: path to Adobe Photoshop executable (Photoshop.exe).adobeScriptRunner.winPhotoshopBetaExe
: path to Adobe Photoshop (Beta) executable (Photoshop.exe).Executable paths for InCopy and InDesign for Windows are not exposed because they are handled differently than the rest of the Adobe apps. Go figure Adobe ¯\_(ツ)_/¯