5 Replies Latest reply on May 30, 2012 12:36 AM by -hans-

    Image Name Caption CS5.5-Please Help

    Danny Noonan Level 1

      Hello,

      Does anyone have a script or know of an application that can apply the image caption over and image, on it's own layer. I've looked all over and all I can find is the new image caption function. Has anyone successfully script this? I need help and if anyone has done this or is willing to help, I would greatly appreciate it.

       

      Here's what I am trying to do:

       

      Go throught the document and put a caption containing the name of each image in the document

      Fill the caption text box with a color so it stands out

      Center the caption on the image so a person can clearly identify what image the name belongs to

      Put all captions on their own layer

       

      ImageCaptionExample.png

       

      I'd appreciate any help or assistance with this.

       

      Thank you in advance!

       

      Danny

        • 1. Re: Image Name Caption CS5.5-Please Help
          absqua Level 4

          I used to use an old Applescript that I think does most of what you want. Here it is if you're on a Mac: http://mac.softpedia.com/get/Utilities/ImageNameTag.shtml . It says it was written for CS2, but it may very well still work in CS5.5.

           

          Jeff

          • 2. Re: Image Name Caption CS5.5-Please Help
            Danny Noonan Level 1

            Hi absqua,

            Do you happen to have the script? I can't download it from the link you provided. If you could post it so I can give a try, that would be awesome!

             

            Thank you,

             

            Danny

            • 3. Re: Image Name Caption CS5.5-Please Help
              absqua Level 4

              I PM'd you a Dropbox link.

              1 person found this helpful
              • 4. Re: Image Name Caption CS5.5-Please Help
                Danny Noonan Level 1

                Thanks absqua,

                This is helpful but I was looking for somthing we could add to an existing script, meaning I was hoping I it wouldn't have any of the boxes pop up with the options. This was helpful though! Thanks for your assistance!

                 

                 

                Danny

                • 5. Re: Image Name Caption CS5.5-Please Help
                  -hans- Level 4

                  Hi,

                   

                  set the appearence of the caption by setting properties of the named objectstyle ....

                   

                   

                  --Tested: ID CS 5.5; OSX 10.7.4 

                   

                   

                  property myObjectStyleName : "myCaption" --Name of Object Style for the caption. You can set the properties whenever you want ... Appearance is set here

                  property layerName : "captionLayerTest" --Name of the layer of the captions

                   

                  tell application "Adobe InDesign CS5.5"

                      tell active document

                          set saveViewPreferences to properties of view preferences

                          set properties of view preferences to {vertical measurement units:millimeters, horizontal measurement units:millimeters}

                         

                          if exists object style myObjectStyleName then

                              set myObjectStyle to object style myObjectStyleName

                          else

                              set myObjectStyle to make object style with properties {name:myObjectStyleName}

                          end if

                         

                          if exists layer layerName then

                              set destLayer to layer layerName

                          else

                              set active layer to layer 1 whose index is 1

                              set destLayer to make layer with properties {name:layerName}

                          end if

                         

                          set theLinks to every link

                          repeat with i from 1 to count of theLinks

                              set theLink to item i of theLinks

                              set {thePage, {y1, x1, y2, x2}, theName} to {parent page of parent of parent, geometric bounds of parent of parent, name} of theLink

                             

                              set tfBounds to {(y1 + (y2 - y1) / 2) - 5, x1, (y1 + (y2 - y1) / 2) + 5, x2}

                              set tf to make text frame at thePage with properties {geometric bounds:tfBounds, applied object style:myObjectStyle, layer:destLayer}

                              set contents of tf to theName

                             

                          end repeat

                         

                          set properties of view preferences to saveViewPreferences

                      end tell

                  end tell

                  Hope it'll work

                   

                  Have a nice day

                   

                  Hans-Gerd Claßen

                  1 person found this helpful