2 Replies Latest reply on Apr 2, 2014 10:50 PM by David André Erichsen

    [AS] set Applescript-variable to a value from a text variable

    David André Erichsen Level 1

      Hi.

       

      I have a script that defines a text variable in the active document like this:

       

      tell application "Adobe InDesign CS6"

                set myDoc to active document

                tell myDoc

                          try

                                    set myOrdrenummerTxt to make new text variable with properties {name:"lowRes_DPI"}

                          end try

                          try

                                    set contents of variable options of myOrdrenummerTxt to "72"

                          end try

                end tell

      end tell

       

      I need to write a new script that uses the stored text variable data.

      How can I (with Applescript) store the new value in a Applescript-variable?

       

      i guess something like this, but this is not working:

       

      tell application "Adobe InDesign CS6"

                set myDoc to active document

                tell myDoc

                          set lowRes_DPI to contents of variable options of "LowRes_DPI"

                end tell

      end tell