Executing Extendscript/Javascript from the C++ API
As far as I know there is no possible way to execute an Extendscript via the C++ API.
In InDesign we can do so by providing the script as a string and fetching simple output results.
Our customers can customize our Plugins by providing their own script in our custom scripting language. Unfortunately our language does not cover all use cases and needs to be constantly expanded. With support for Extendscript/Javascript execution from the C++ API we could circumvent the problem and give the users a lot of flexibility and power.
-
Leo Quensel commented
CEP extensions can only be called in asynchronous fashion by using event triggers.
Whether the script succeeds, getting return values etc.. is impossible to determine. In some cases the script only gets triggered during the next idle time.
We need this functionality to circumvent missing features and bugs in the C++ API and call scripts during huge processing tasks.
There is no way we can wait for the next idle time.Further, CEP is being discontinued in the future and provides a huge hassle during installation when paired with C++ plugins since CEP extensions have to be installed differently.
CEP is not an option here.
-
Minne Danhieux commented
This can be done via a CEP extension. Nothing extra needed for this.