#include "he_utils.js" // from here ax2js comes #include "he_edit.hejs" // and from here GetSelectedText helper var arguments = ax2js(ScriptArguments); Output().write(ScriptName + " is executed with arguments : "); for (i = 0; i < arguments.length; i++) Output().write(arguments[i] + " "); Output().writeln(); // insert line break after last command line parameter if ( ActiveDocument != null ) { Output().writeln(ActiveDocument.Path); Output().writeln(GetSelectedText(ActiveDocument.ActiveView)); }