Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • in reply to: Find overlapping frames #14403270
    Alicia
    Participant

    Thank you, that would be great! Here’s a Dropbox link:

    https://www.dropbox.com/scl/fo/qmbipjryu7euxk27zzq3m/AGL8bMBLEqiFfxa-Q-F1w8Q?rlkey=3wlpe5qygimnmn8istpfxuru8&dl=0

    The issue is in the running heads on pages 504–505. On page 504 one of the text frames is locked and the other is unlocked. On page 505 both of them are unlocked.

    The problem is locating the duplicate text frames, so we could see where they are and decide what to do. In our design text frames should never overlap at all, so a script that finds text frames overlapping by any amount would work in this case and also when one frame is larger and hiding a smaller frame. We wouldn’t want the script to make changes, just show us the problem frames.

    So the script would find the first overlapping text frame in the file and we would fix it manually, then we would keep running the script until no overlapping text frames are found.

    Or the script could give a list of pages with overlapping text frames.

    In his post on this thread David Blatner fixed up a script that finds unlocked overlapping text frames except those that are the same size and Y coordinate (so not if either or both of the frames is locked to the master page and not if their size and position match exactly).

    app.activeDocument.viewPreferences.rulerOrigin=RulerOrigin.SPREAD_ORIGIN;

    //If you are going to work with pages, not spreads, change the line above to PAGE_ORIGIN;

    for (a = 0; a < app.activeDocument.spreads.length; a ++) {
    var pg = app.activeDocument.spreads [a];
    for (b = 0 ; b < pg.textFrames.length; b ++) {
    var r1 = pg.textFrames [b];
    for (c = 0 ; c < pg.textFrames.length; c ++) {
    var r2 = pg.textFrames [c];
    var gb1 = r1.geometricBounds;
    var gb2 = r2.geometricBounds;

    if ((r1 != r2) &&
    (gb1 [0] > gb2 [0] && gb1 [0] < gb2 [2] && gb1 [1] > gb2 [1] && gb1 [1] < gb2 [3]) ||
    (gb1 [2] > gb2 [0] && gb1 [2] < gb2 [2] && gb1 [1] > gb2 [1] && gb1 [1] < gb2 [3]) ||
    (gb1 [0] > gb2 [0] && gb1 [0] < gb2 [2] && gb1 [3] > gb2 [1] && gb1 [3] < gb2 [3]) ||
    (gb1 [2] > gb2 [0] && gb1 [2] < gb2 [2] && gb1 [3] > gb2 [1] && gb1 [3] < gb2 [3])) {
    r1.select ();
    var cnf = confirm ("Text frames overlap. Continue searching?", true, "Overlapping text frames");
    if (!cnf)
    exit ();
    }
    }
    }
    }

    Here’s the source of the original script:

    https://stackoverflow.com/questions/33231516/indesign-javascript-to-find-overlapping-textframes

    I know nothing about scripting and have no idea of how big of an ask this is, so no hard feelings if it’s more than you want to get into!

    in reply to: Find overlapping frames #14403223
    Alicia
    Participant

    Oh, now I see what you mean about unlocking the locked frames, Nick! That may well be a necessary step. My co-worker pointed out that my solution won’t work if there are two unlocked frames on top of each other, so I’m still floundering!

    in reply to: Find overlapping frames #14403162
    Alicia
    Participant

    Thanks, Nick, it’s not really a question of overriding locked items; the problem is that we have a duplicate unlocked text frame on top of a locked text frame because the master page was applied twice by accident. The locked item is basically invisible because it’s an exact duplicate.

    But I think a simple solution would be to make a copy of the file and move the items on the master page out of the way and then check for duplicates.

    I appreciate your help, though!

    in reply to: Find overlapping frames #14403126
    Alicia
    Participant

    Oh, yes, that does work! But not if the frames are the same size and Y coordinate, and not if one of them is locked to the master page. The script does find text frames that are the same size and X coordinate.

    In our case the master page running head text frames were applied twice by accident, we think, and the one on top was unlocked.

    Is there a way to search for locked master page items? I guess hiding each individual item in the Layers panel shows the master page locked items, but it would have to be done one spread at a time.

    in reply to: Find overlapping frames #14403122
    Alicia
    Participant

    Thank you for the response! Unfortunately nothing happens when I try to run the script in InDesign 2020 on the Mac. I tried relaunching InDesign, and running other scripts. I also tried it on InDesign 2022 on a different computer. Is it likely that the problem is the older versions of InDesign?

    in reply to: Spot excess tracking #14374248
    Alicia
    Participant

    So interesting!

    In the text I’m looking at, the text is scaled 100% vertical and horizontal. I retyped the tracking values as -15 in the tracking field and in the Find/Change window, and it still can’t find it.

    in reply to: Spot excess tracking #14374241
    Alicia
    Participant

    Hi, David,

    In the Find/Change window, Text search of the Document, Find Format: Basic Character Formats: Tracking: -15, other fields left blank

    The search returns “Cannot find match”, but there is a paragraph with -15 applied to part of a paragraph. When I apply the tracking to the entire paragraph, it is able to find it. However, with some values it finds the specified tracking whether it is part of a paragraph or the whole paragraph.

    Thanks,

    Alicia

    in reply to: Spot excess tracking #14374228
    Alicia
    Participant

    Hi, Anne-Marie,

    Here is a new wrinkle on this issue:

    While searching for specific values within those ranges in ID 2022, we noticed that searches for tracking from 1 to 8 and -1 to -8 produced hits, but searches for 9 to -9 tracking and above (10 to 15 and -10 to -15) resulted in no hits despite paragraphs being tracked at those values.

    Does that seem like a bug?

    Thanks, Alicia

    in reply to: Spot excess tracking #14370883
    Alicia
    Participant

    Thanks, Anne-Marie! Yes, I tried again making sure the Find What and Change To fields are empty and the scope is set correctly, and I get the same result. A co-worker gets the same result as well.

    I misspoke about flagging the tracking: I should have said that the H&J Violations highlighting doesn’t alert us to the extra-loose spacing. It highlights the problem text but not with the top-level highlight that we examine and fix.

    Custom Kerning and Tracking does highlight the problem text but as you say it doesn’t distinguish between units of tracking.

    in reply to: Spot excess tracking #14370882
    Alicia
    Participant

    Yes, that’s it. Okay, good to know, thanks!

    in reply to: Problem searching for font family #14356401
    Alicia
    Participant

    Hi, Steve, thanks for your response. We downloaded both font sets from Adobe and they are both listed as copyrighted to Adobe Systems Incorporated.

    in reply to: Problem searching for font family #14355509
    Alicia
    Participant

    I forgot to say that I’m using InDesign 15.1.3 on a mid 2012 Mac Pro, running High Sierra, 10.13.6

    Alicia
    Participant

    When I saved the file as IDML and reopened it, the highlighting was back to normal. Maybe some kind of file corruption?

    Alicia
    Participant

    It is weird! The file info for both files says the version is 15.1. When we open yesterday’s file, it shows the H&J violations highlighting. If we toggle back and forth between the two files, the highlighting changes, but nothing else on the page or in the Control Panel does, that we can see.

    in reply to: Same tracking, different results #14334285
    Alicia
    Participant

    Chris, wow, those are things I would not have thought to check, and I’ll make note of them. In this case the settings are the same in both files, but I sure appreciate the suggestions. Thank you!

Viewing 15 posts - 1 through 15 (of 21 total)