0 Replies Latest reply on Apr 4, 2008 9:20 AM by (gtomps)

    CS3(AS) Open selected image in photoshop/resize/relink

      I'm working on a layout with hundreds of placed images. I only need to resize a select few to so they are placed at 100%, I want to do this by running a script on just the image selected in layout, open it in photoshop, resize to match the scaling in Indesign and then relink. I've started a script that I hope is getting close. The image opens in photoshop but then wont resize(maybe I should post this in the photoshop scripting forum as well). And then I need it to relink back in InDesign.

      Here is what I have started:

      tell application "Adobe InDesign CS3"
      set theSelection to item 1 of selection
      set theClass to class of theSelection
      if theClass is in {image, PDF} then
      set theSelection to parent of theSelection
      end if
      set myHoriz to absolute horizontal scale of theSelection
      set myVert to absolute vertical scale of theSelection
      set theFilePathOfImage to file path of item link of graphic 1 of theSelection
      tell application "Adobe Photoshop CS3"
      open alias theFilePathOfImage
      set docRef to current document
      resize image docRef width (myHoriz as percent) height (myVert as percent) resample method bicubic sharper
      end tell
      set theSelection to update theSelection
      end tell