Skip navigation
Currently Being Moderated

Will CS4 scripts work with CS6?

May 15, 2012 4:46 AM

I currently (still) use InDesign CS4 and I am thinking about getting CS6 (using the Cloud). However, I use a LOT of scripts and I wonder if I can keep on using that scripts or not...

 
Replies
  • Currently Being Moderated
    May 15, 2012 6:14 AM   in reply to J van E

    Basically, yes. Simply try it; if it works, it works. If it doesn't, either modify it (usually trivial) or make CS6 believe it's really CS4 by adding this line to your script:

     

    app.scriptPreferences.version = 6;

     

    (InDesign 6 is part of CS4).

     

    Peter

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 7:30 PM   in reply to Peter Kahrel

    Um...

    Peter, that's really bad advice. That'll make any subsequent script which relies on CS5 or later features not work.

     

    Either you should wrap that in a try/catch/finally, or use version folders.

     

    Approach 1:

     

    try{

    app.scriptPreferences.version = 6;

    // your script

    }catch(err){

         throw err;

    } finally{

    app.scriptPreferences.version = parseFloat(app.version);

    }

     

    Approach 2:

     

    Create a folder in your scripts panel called "Version 6.0 Scripts", and place the script in that subfolder.

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 10:34 PM   in reply to Harbs.

    Ah, Harbs, you're absolutely right. I had forgotten that app.scriptPreferences.version is sticky (never use it myself.) Thanks.

     

    Peter

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points