Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes

I was looking at the in5 API Docs and realized the first thing listed is adding `#targetengine 'in5api'` to the top of the script. That line is something exclusive to ExtendScript if i recall correctly, so it wont work in the more modern UXP scripting. Is there a way to access the api using a `require()` or `import` statement so that the api could be used with UXP scripts?

ago in misc by (330 points)
  

1 Answer

+1 vote
 
Best answer
Yes, you are correct, the in5 API specifically runs within the Adobe ExtendScript engine.

The #targetengine 'in5api' directive is the key that hooks your script into this environment, ensuring that your commands are executed.  

There is currently no supported way to use the in5 scripting API in a UXP-based script using require() or import. You’ll need to use ExtendScript for now if you want access to that API, which will allow you to automate in5 workflows.
ago by (800 points)
selected ago by
thanks for the reply!