I've now learned the following:
Note that the extension is named “AppleScript” because it also supports AppleScript. But all you need to do is save a file with a
.jxa extension and VSC will auto-recognize it as a JSA script.
To compile and run JXA scripts, open the Command Palette with ⌘⇧P, and type “JXA” to see the choices for it. Or, just use these shortcuts:
Creating .scpt File from .jxa File
Good news. When you compile/run the
.jxa file in VSC, it automatically creates a companion
.scpt file, which you will need if you want to run the file from a KM Execute JXA from a file, or via FastScripts.
.scpt File in VSC
Short answer is you can’t. You will need to save a text file with a
That's all for now.