Skip to main content
Known Participant
September 7, 2009
Answered

Contact Sheet Automation

  • September 7, 2009
  • 1 reply
  • 2596 views

Hi everyone,

You guys here have a 100% track record so far helping me out so I've high (desperate) hopes for this one...

I work for a fashion catalogue and need to prepare a shoot plan for the photographer using the designer's original sketches. Scanning the artwork is out of the question as there are thick fabric swatches, that need to remain there, all over the sheet. My previous solution and rather effective one too, was to photograph them tethered from my camera and then bumping the levels. That part I have covered.

The problem I have is that I'm going to need an automated way for each of the images to be placed into a Picture Box and have an adjacent Text Box be filled with the file name sans the file suffix (which I can do easily with a find and replace I guess). But ultimately I need to avoid having to type the filename into the box manually. I've attached an example sheet to help illustrate what I'm after.

I'd be so grateful if you can help me here!

Cheers,

Lewis

This topic has been closed for replies.
Correct answer Jongware

Is that something you'd be able to help me with Harbs? Although I appreciate that you most likely have other things that are keeping you busy! If that is the case could you perhaps point me in the direction of another user on here that would be able to help?

Much appreciated either way.

Cheers,

Lewis


How about this javascript?

if (app.selection == null || app.selection.length < 2)
{
  alert ("Please, DO select just an empty text frame and one or more images...");
} else
{
  filelist = '';
  textframe = undefined;
  for (i=0; i<app.selection.length; i++)
  {
    if (app.selection.hasOwnProperty("contents"))
    {
     if (textframe != undefined)
     {
       alert ("That's more than a single text frame. Seriously.");
       exit(0);
     }
     textframe = app.selection;
    } else
    {
      if (filelist == '')
        filelist += app.selection.images[0].itemLink.name.replace(/\..+$/, '');
      else
        filelist += '_'+app.selection.images[0].itemLink.name.replace(/\..+$/, '');
    }
  }
  if (textframe == undefined)
    alert ("Got a lot of stuff but no text frame?");
  else
   textframe.contents = filelist;
}

Select a text frame along with one or more images and run the script. The text frame will be emptied, and the list of image file names sans extension will magically appear inside it, separated by underscores.

Copy, paste into the Extendscript Toolkit Editor that came with InDesign, save as "GrabImageNames.jsx" into your Scripts folder. When saved in the correct location, ID will immediately show it in the Scripts panel.

[Edit] Added a final check for a valid text frame somewhere in the selection. :-P

[Edit #2] Damn my busy brain. Additional note: it will only work with bitmap images -- TIFF, GIF, BMP, JPEG (PSD?), not with AI, EPS, PDF, WMF. Additional note #2: it mercilessly slices off everything after the first period, so if you may have filenames that contain multiple periods, scream and I'll take a look.

1 reply

Harbs.
Legend
September 7, 2009

Take a look at the image catalog script which is installed with InDesign.

Also, Bridge can build a contact sheet as well.

Known Participant
September 7, 2009

Thanks for the quick reply Harbs.

I've just had a look at my previous artwork (from last year) and have realised that there is an added complication. I forgot to mention that the the top and trousers are different files and thus would need the joining of several filenames. ie. Picturebox1+Picturebox2+Picturebox3 would need to result in Filename1_Filename2_Filename3 (I've listed 3 as occasionally there'll be a Jacket involved. If you know what I mean? I've updated my supporting graphic again.

Does this make things impossible? Really appreciate any help.

Cheers,

Lewis

Harbs.
Legend
September 7, 2009

Not impossible, but it'll take a custom script...