Insert credit self for images.

He may appeal the block of text next to the image?

I intend to make a text box to enter in the credit for the images.

The text box may be empty or say "Grab the credit."

Screen Shot 2015-11-05 at 11.53.18 AM.png

I tried to use the legends but I can't place him as shown.

Thanks for the help!

Here is a "quick and dirty" script Totally not tested. Change space, the width and height variables (with comments) regardless of the values that you need in millimeters, or change units of measure to those that you use.

var scriptName = "Insert auto credit for images",
doc;

PreCheck();

function Main() {
    var horUnits = doc.viewPreferences.horizontalMeasurementUnits,
    verUnits = doc.viewPreferences.verticalMeasurementUnits,
    sel = app.selection[0],
    gb = sel.geometricBounds,
    top = gb[0],
    right = gb[3],
    space = 1, // space between the image and the credit frame
    width = 5, // the width of the credit frame
    height = 30; // the height of the credit frame

    if (sel.parentPage.constructor.name == "Page") {
        var page = sel.parentPage;
        var creditFrame = page.textFrames.add();
        creditFrame.rotationAngle = 90;
        creditFrame.geometricBounds = [top, right + space, top + height, right + space + width];
        creditFrame.contents = "Enter the credit.";

    }

    doc.viewPreferences.horizontalMeasurementUnits = horUnits;
    doc.viewPreferences.verticalMeasurementUnits = verUnits;
}

function PreCheck() {
    if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
    doc = app.activeDocument;
    if (doc.converted) ErrorExit("The current document has been modified by being converted from older version of InDesign. Please save the document and try again.", true);
    if (!doc.saved) ErrorExit("The current document has not been saved since it was created. Please save the document and try again.", true);
    if (doc.selection.length == 0) ErrorExit("Nothing is selected. Please select an image and try again.", true);
    if (doc.selection.length > 1) ErrorExit("Please select only one image and try again.", true);
    Main();
}

function ErrorExit(error, icon) {
    alert(error, scriptName, icon);
    exit();
}

Tags: InDesign

Similar Questions

Maybe you are looking for

  • Add a printer does not

    I can't add my printer software download fine then when I connect the printer when prompted, it times out and says that the printer can be added, then I tried the add printer option and it does not respond when I click Add a local printer. Help, plea

  • Install a new hard drive and copy that

    I have a gateway that I bought at wal-mart about two years ago, it was windows vista Basic.  The hard drive is failling and I am wanting to install a new hard drive but the laptop didn't come with a cd of the operating system.  Is it possible to copy

  • BlackBerry Smartphones Cant find IMEI for Blackberry Torch 9800

    Hi all I got my phone as a birthday gift. It is is unlocked. Since then I've been able to use it without any problem. To find the IMEI number, I tried three options, nothing helps. Option 1 - type * #06 # : when I do this, my phone returns the messag

  • The permissions problems win 7 home ed.

    I have problems with permissions.  I am registered as an administrator and I have no opportunity to a new folder. When I open the properties of the folder read-only is enabled. I go through the change permissions reboot and still the same issue. Is t

  • Pass the connection parameter to connected in portal Builder page

    Hi allWebCenter Portal Builder:I created the navigation link and connection that link to the page. I just want the parameter to link to this page.Please help me.Kind regardsMaury