Back in 2021 we released our After Effects Command IDs searchable list tool. To date, it's our most popular tech blog, helping After Effects tool developers fill the gaps in APIs to achieve bigger and better workflows. And now it's even better!
With the 2.0 release, we've added 411 new commands to the list totalling a whopping 909 commands for After Effect, made possible by new menu scanning methods (see "How it Works" below).
Start using the tool today here:
If you're interested in what Command IDs are, and why you should use them, keep reading...
When building scripts or extensions in After Effects, there are loads of features and commands that you can't automate with scripting in the ExtendScript API. Commands such as undo / redo, viewport controls, and so many others have for years been impossible to access or automate via the provided APIs, prohibiting many workflows, however a solution does exist.
While offically undocumented by Adobe, for years Menu Command IDs have been used by tool developers as a workaround to automate certain operations that just can’t be automated via the provided API.
Command IDs essentially mimic the same behavior as if the user clicked a button, or triggered a hotkey for a particular function. Given this, unfortunately no arguments or settings can be passed to Command IDs and no results can be returned from them, however in many cases Command IDs are the only way to automate certain workflows that would otherwise be impossible.
In the ExtendScript API, you can always attempt to search for a desired command by name with:
var cmdId = app.findMenuCommandId('Redo'); // Result: 2035
app.executeCommand(cmdId); // Execute Redo
The problem is, this method is fairly tedious unless you know the exact spelling of the command you’re looking for. Also, this method is not reliable across different languages packages of After Effects, so traditionally, the best practice is to find your Command ID, and then call it directly using the number, not the name.
Since there's no official list of Command IDs from Adobe, we’ve put together a simple Command ID Searchable List app built in React to quickly search and find the Command IDs for each version of After Effects.
To use a command, simply find it’s Command ID number, and execute it with:
app.executeCommand(2035);
The viewer pulls data from a series of JSON files we've generated for each version of After Effects. (see below)
If there's no documented list of Command IDs provided by Adobe, then how are we coming up with this list? We have 2 strategies, and we combine the best of each to get the maximum and most accurate results.
Each install of After Effects comes with dictionary files that show translations of text fields for different languages. Fortunate for us, many of these strings are accompanied by Command ID numbers.
Using a simple parser, we are able to extract these numbers into a usable JSON list of commands.
{
"1": "Quit",
"2": "NewProject",
"3": "OpenProject",
"4": "Close"
...
}
This method got us about half of the way there, and the first version of our searchable list tool relied soley on this method, however we knew that there were at least twice that number of commands out there, if not more, so we continued investigating.
After further research, we stumbled upon another way to gather this info:
Since we know that most Menu Command IDs correlate directly to the actual text in the File menu of the application we started looking into ways of extracting this info from apps.
Turns out, via AppleScript in MacOS, it is possible to extract the strings of all the File Menu options in the target application.
We built a new script that would extract these strings from the running After Effects instance, run some cleanup and formatting operations, and then pass each of them through the Find Menu Command function in After Effects to get the Command ID number.
As a result, we had a list of commands and numbers provided by After Effects with, resulting in 411 new commands not previously listed.
Finally we merge the results of both methods eliminating duplicates, and our final number is 909 Menu Command IDs for After Effects 2025.
If you're interested in more details on how this works, check out the menu-scan-run.js file in our repo:
Additionally, if having the list as JSON files is more useful to you, you can download JSON files for each version of After Effects on the repo as well:
Need assistance with your After Effects tool development? Reach out to the Hyper Brew team and we'd be happy to help!