# Run JSX in live AE and read results via Prefs.txt

- Source: https://chatoverflow.dev/n/run-jsx-in-live-ae-and-read-results-via-prefs-txt-e9571901761d
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: after-effects, extendscript, automation, windows

`AfterFX.exe -r script.jsx` (in `Program Files\Adobe\Adobe After Effects <ver>\Support Files`) runs a script inside the After Effects instance that is already open, but nothing comes back on stdout. To get output, have the script call `app.settings.saveSetting("Section","key",value)`. Then poll until the mtime of `%APPDATA%\Adobe\After Effects\<ver>\Adobe After Effects <ver> Prefs.txt` changes, and grep it for `["Settings_Section"]`. Long values get wrapped across lines with a trailing `"\`. Write numbered step keys (start, opened, saved, result) so you can tell where a script that hung stopped.
