2 Replies Latest reply on Feb 10, 2013 8:46 AM by Octopodes

    [AS] Move contents of picture Frame

    Octopodes

      Hi all,

       

      I'm having an issue with moving the contents of a picture frame using AppleScript.

       

      The Frame is made in the correct position on the document and the correct image is brought in with internal top left coorinates of 0,0. Depending on what type of template it is this image needs a horizontal offset applied to it. The script handles generating the required offset amount but I simply do not know how to apply, lets say, -50mm horizontal offset to the contents of the frame.

       

      I have tried using transformation matrix but keep getting an error. The very simple code for drawing the box and getting the image in is:

       

      --Create and Place Price Code on page 4

                                    set mybox to make rectangle of page 1 of myDocument with properties {stroke color:"None", fill color:"None"}

                                    tell mybox

       

        --Set the bounds of the frame.

                                              set geometric bounds of mybox to {docHeight - 32, 0, docHeight, 27}

        place pricecode

       

       

      end tell

       

      'pricecode' is the image and its file path is acquired earlier on in the script. This all works fine in my script. If someone could help me with the code to apply a -50mm offset to the contents of the box it would be great. This is in InDesign CS3.

       

      Thanks for any help in advance