1 Reply Latest reply on Nov 3, 2010 4:11 PM by sstanleyau

    [AS] Versioning to preserve CS3 scripts in CS5

    allisonblake Level 1

      Hi everyone,

      I've been reading through the thread about what has changed for scripting InDesign CS5. I have been writing scripts for CS3 for about a year and we are upgrading in the new year. I have the demo of CS5 loaded so I can test how the scripts i've written will or won't run.

       

      Someone indicated in that "what's different" thread that you can "version" the scripts so that they will run in newer versions without having to rewrite the parts of the syntax that have  changed.

      Can someone elaborate on how to do this with AppleScript?

      I put

      tell application "Adobe InDesign CS5"

      set version of script preferences to "5.0"

      at the beginning of the script (and changed all instances of CS3 to CS5 in the script as well) but the script is still not working as with CS3.

      Is there something else I need to do to get CS5 to recognize the syntax of CS3 and understand the commands?

       

      Thanks

        • 1. Re: [AS] Versioning to preserve CS3 scripts in CS5
          sstanleyau Level 4

          You will want to set the version back at the end of the script too.

           

          To deal with the syntax issues, you can wrap the relevant code in:

           

           

          using terms from application "Adobe InDesign CS3"

           

          [...]

          end using terms from

           

          You can use the "publish terminology" command to make a dummy dictionary-only version of CS3 so you don't need both versions running; how to do it is documented in the InDesign CS5 Scripting Guide.

           

          For scripts you run from the Scripts panel, you don't need to make any changes -- just enclose them in a folder called "Version 5.0 Scripts".

          1 person found this helpful