2 Replies Latest reply on Jul 9, 2008 6:18 PM by (Phil_Courterelle)

    setting properties for existing graphics with applescript

      Hi all...applescript novice...

      working on a small Applescript project that selects images in an InDesign document, reads the properties for each image - scale, shear, geometric boundaries, rotation ect - and saves it to a text file. A second script then reads the text file and applies the previously recorded properties to the images.

      The first part went great but I'm having difficulty with the second part - applying the saved properties to image containers within InDesign.

      While I can gather information by looping through the information referenced by the all graphics object, it appears that I cannot set properties in the same way. For example, the script sample below generates a compile error on the line "set absolute horizontal scale of item 1 of myGraphics". The error says I cannot place an identifier after an identifier.

      Suggestions would be very appreciated

      --start script sample

      tell application "Adobe InDesign CS3"

      --get list of graphics
      set myGraphics to all graphics of document 1

      set absolute horizontal scale of item 1 of myGraphics to 55.55 as real

      --end script sample
        • 1. Re: setting properties for existing graphics with applescript
          sstanleyau Level 4
          On 8/7/08 9:52 AM, "Phil Courterelle" <member@adobeforums.com> wrote:<br /><br />> --start script sample<br />> <br />> tell application "Adobe InDesign CS3"<br />> --get list of graphics<br />> set myGraphics to all graphics of document 1<br />> <br />> set absolute horizontal scale of item 1 of myGraphics to 55.55 as real<br />> <br />> --end script sample<br /><br />Works for me:<br /><br />tell application "Adobe InDesign CS3"<br />    --get list of graphics<br />    set myGraphics to all graphics of document 1<br />    set absolute horizontal scale of item 1 of myGraphics to 55.55<br />    get absolute horizontal scale of item 1 of myGraphics --> 55.55<br />end tell<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au>
          • 2. Re: setting properties for existing graphics with applescript
            Level 1
            Thanks...help point me to the real problem...I had placed the call to set absolute horizontal scale within tell to the finder...

            Tell finder
            if file exists
            set absolute scale .....
            end tell

            the finder had no clue ... hence why it was a compile not a runtime error

            thanks again