If the script is installed in the program folder presets/scripts folder, then it will be available under File > Scripts when you record the action.
If the script file is located elsewhere, record the action and use File > Scripts > Browse to record the execution of the script.
ExtendScript Toolkit is a 32-bit application, so it doesn't work on modern Mac OS systems, but it can still be used in Windows.
Adobe recommends the use of Visual Studio Code + Adobe ExtendScript Debugger as an IDE for legacy ExtendScript (JavaScript) code.
That being said, one can use any plain text editor (not RTF or word processors) to code the ExtendScript language.
It is best to clear the log, run a single command step in Photoshop, and then copy the appropriate block of code generated by the plugin. Many unnecessary steps are often recorded by the plugin and it helps if one has some knowledge of coding to successfully use the code. The code generated by the plugin is known as "Action Manager" or AM code, which is basic low-level ExtendScript code used by Photoshop when various steps are executed.
AM code and the standard Document Object Model or DOM code can be combined and can co-exist in the same .jsx file.
An example of DOM code to add a new standard layer:
[CODE=javascript]app.activeDocument.artLayers.add();[/CODE]
An example of raw AM code to add a new standard layer, recorded by ScriptingListener:
[CODE=javascript]
var idmake = stringIDToTypeID( "make" );
var desc8383 = new ActionDescriptor();
var idnull = stringIDToTypeID( "null" );
var ref740 = new ActionReference();
var idlayer = stringIDToTypeID( "layer" );
ref740.putClass( idlayer );
desc8383.putReference( idnull, ref740 );
var idlayerID = stringIDToTypeID( "layerID" );
desc8383.putInteger( idlayerID, 119 );
executeAction( idmake, desc8383, DialogModes.NO );
[/CODE]
This raw AM code recording can be refactored (reformatted) and somewhat simplified:
[CODE=javascript]
function s2t(s) {
return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
var reference = new ActionReference();
reference.putClass( s2t( "layer" ));
descriptor.putReference( s2t( "null" ), reference );
executeAction( s2t( "make" ), descriptor, DialogModes.NO );
[/CODE]
The Photoshop DOM has many missing commands/operations. This is why one must use AM code to do things that would otherwise not be possible.