Run ExtendScript
ae_run_jsxExecute custom ExtendScript in After Effects to inspect projects, modify compositions, or automate layer tasks, returning JSON results.
Instructions
Run arbitrary ExtendScript (ES3) inside After Effects. The code is the BODY of a function: use return to send a JSON-serializable value back, and read inputs from args. Helpers available: __findComp(ref), __findLayer(comp, ref), __layerInfo(layer). Example: return app.project.numItems;
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "ae_run_jsx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Value exposed to the script as `args`. | |
| code | Yes | ExtendScript function body. | |
| timeoutMs | No |