Skip to main content
Participant
May 24, 2023
Question

Migration

  • May 24, 2023
  • 3 replies
  • 385 views

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 has been closed for replies.

3 replies

Community Expert
May 25, 2023

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 

-Manan
Participant
May 25, 2023

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.

Legend
May 24, 2023

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

m1b
Community Expert
Community Expert
May 24, 2023

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

Participant
May 24, 2023

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