I answered the question over here Re: Create a build script for Extend Script
I have some more info on it if needed but don't have time to post it this week.
page 11 in the user manual
Automatic jsxbin Conversion
ExtendScript ToolKit offers an Export to Binary feature that instantly converts a js(x) file into jsxbin. The
jsxbin export process can be done automatically without user interaction.
To do this:
1. Write a compiler script file that compiles .jsx files into a .jsxbin file.
The script file must start with this target directive:
Use the app.compile() method and pass the content of the script file as a String parameter.
In the script, store the result in a new file with the extension .jsxbin.
2. Launch the ExtendScript ToolKit with the command-line parameter -cmd [path to compiler script file]:
"ExtendScript Toolkit.exe" -cmd compiler.jsx
"ExtendScript Toolkit.app/Contents/MacOS/ExtendScript Toolkit" \
Here is a sample compiler script (compiler.jsx) with the source script's file path hardcoded.
var fileIn = File("/c/jsxbin_test/source.jsx");
var s = fileIn.read();
var t = app.compile(s);
var fileOut = File( fileIn.absoluteURI + "bin" ) ;