1 Reply Latest reply on Jul 21, 2009 3:50 PM by sstanleyau

    Using script labels

    MVarner

      I have a script that opens an Indesign CS4 pages, creates a rectangle and places an image in the rectangle.  This part works great.  What I would like to do is to have the image placed in an existing box that has been labeled using a scipt label.  I can't seem to figure it out.   Here is my current code.

       

      tell application "Adobe InDesign CS4"

            set comic4 to "Macintosh HD:users:marshall:documents:comics:bbt" & DYear & Dmonth & Dday & ".tiff"

            set comic7 to "Macintosh HD:users:marshall:documents:comics:pe09" & Dmonth & Dday & ".tif"

            set mydoc to open "Macintosh HD:users:marshall:documents:comix:GGDailyBlank.indd"

            tell mydoc

                   tell page 1

                         set myrect4 to make rectangle with properties {geometric bounds:{30.6, 2.4, 41, 32.5}}

                         set myrect7 to make rectangle with properties {geometric bounds:{43.4, 33.5, 54, 63.5}}

                        

                         tell myrect4

                               set myGraphic to place (comic4 as string)

                               fit myrect4 given content to frame

                              

                               tell myrect7

                                     set myGraphic to place (comic7 as string)

                                     fit myrect7 given content to frame

                                    

                               end tell

                         end tell

                   end tell

            end tell

      end tell