Skip to main content
Participant
May 24, 2023 8:11 AM UTC
Question

Migration

Hi everyone, I need your help..

For a customer of my company, I need to update indesign 2014 to indesign 2022 but there are a robot witch make many command in javascript. 

Do you think that I need to update my script before the migrattion ? (es5 => es6 and some indesign objet model etc...)

 

Thants for your help

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

Community Expert
May 25, 2023 5:23 AM UTC

In addition to the trick mentioned by @m1b to create a version specific folder to run the script in older scripting engine. You can also use the following statement to set the script engine version from within the script itself

app.scriptPreferences.version = 15.0 //Change the version as per your need

See the following documentation

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ScriptPreference.html%23d1e336112

The advantage with setting this property is that if you want to use the older engine for just a set of lines of code, you can do so and then reset it to the latest version for other lines of your code. This way you can use the newer API's of the new version in addition to using the older DOM version for some part of your code.

-Manan 

Translate
-Manan
Participant
May 25, 2023 6:18 AM UTC

Hello, thanks for this trick, I will go to try also, I have a script with 2000 lines so why not...

 

Thank you very much everyone, I will be back and leave a comment.

Translate
Legend
May 24, 2023 11:53 AM UTC

Certainly, always test scripts. I am not sure I see the issue, just install the new version, keeping the old version, and test.

Translate
m1b
Community Expert
Community Expert
May 24, 2023 8:29 AM UTC

Hi @Jimmy30034971re4d, I think you are saying that you have some old scripts that you are worried won't work properly in Indesign 2022? If that's right, here are some pointers:

 

1. Nothing really has changed in ExtendScript at all since 2014. Indesign now has UXP, but it isn't really ready for production scripts, so your scripts should stay in ExtendScript for now.

 

2. However, some things have changed in the scripting API between 2014 and 2022. However, I believe you can make a folder in the scripts folder called "Version 17.0 Scripts" (see the this answer) so maybe you can make a folder called the version Indesign was in 2014 and put your script in there. Indesign apparently can run scripts with old APIs in this way.

 

So possibly nothing to do, but testing!

- Mark

Translate
Participant
May 24, 2023 8:47 AM UTC

Ok thanks so much for answer, I will go to test this tools. 😄

Translate