Skip to main content
aniri5j9ox8tw2ln
Legend
Jan 26, 2022 9:05 AM UTC
Answered

Suche Script oder Plug-in: Verknüpfungen suchen und einfärben

Hallo!

Viele viele Jahre ist es her, aber ich kann mich erinnern dass es für Indesign einen Script oder Plug-in gab, wo mir alle verwendeten Verknüpfungen in einem Dokument in den verschiedenen Ordner im Finder suchte und z.b. Grün einfärbte. Ich weiß es gibt die Paket-Funktion, aber manchmal möchte man die Ordner mit jede Menge Bilder behalten und nur die im Dokument verwendeten Verknüpfungen gekennzeichnet haben. 

 

Kennt jemand noch diese Funktion? Ich finde leider mit Google nichts...

Dankeschön!

m1b
m1bCorrect answer
Community Expert
Jan 27, 2022 8:09 AM UTC

This script will apply the green label to each link in the active document.

- Mark

 

Edit 2025-02-27: UPDATE This old script will throw an error on newer versions of MacOS, so see the updated script below.

 

 

colorLinksByFinderLabelIndex(app.activeDocument, 6);  // 6 = GREEN


function colorLinksByFinderLabelIndex(doc, labelIndex) {
    // labelIndex is a Number in range 0-7
    doc = doc || app.activeDocument;
    labelIndex = labelIndex || 2;
    var links = doc.links;

    for (var i = 0; i < links.length; i++) {
        var link = links[i];

        // don't bother if it's missing
        if (link.status == LinkStatus.LINK_MISSING) continue;

        // if file exists, label it
        if (File(link.filePath).exists)
            app.doScript('tell application "Finder" to set label index of (alias "' + link.filePath + '") to ' + labelIndex, ScriptLanguage.APPLESCRIPT_LANGUAGE);
    }
}

 

24 replies

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
Jan 27, 2022 8:09 AM UTC

This script will apply the green label to each link in the active document.

- Mark

 

Edit 2025-02-27: UPDATE This old script will throw an error on newer versions of MacOS, so see the updated script below.

 

 

colorLinksByFinderLabelIndex(app.activeDocument, 6);  // 6 = GREEN


function colorLinksByFinderLabelIndex(doc, labelIndex) {
    // labelIndex is a Number in range 0-7
    doc = doc || app.activeDocument;
    labelIndex = labelIndex || 2;
    var links = doc.links;

    for (var i = 0; i < links.length; i++) {
        var link = links[i];

        // don't bother if it's missing
        if (link.status == LinkStatus.LINK_MISSING) continue;

        // if file exists, label it
        if (File(link.filePath).exists)
            app.doScript('tell application "Finder" to set label index of (alias "' + link.filePath + '") to ' + labelIndex, ScriptLanguage.APPLESCRIPT_LANGUAGE);
    }
}

 

Translate
aniri5j9ox8tw2ln
Legend
Jan 27, 2022 12:11 PM UTC

hello Mark!

Great, it works! I thank you so much for your help :))))

Translate
Jens Trost
Inspiring
Jan 26, 2022 12:57 PM UTC

Hi,

 

ich kenne das Script nicht, aber:
die Bridge kann dir alle Verknüpfungen eines InDesign Dokuments in der Metadaten-Palette anzeigen und über Ansicht -> Verknüpfte Dateien anzeigen fasst sie dir alle Links in der Anzeige zusammen/zeigt nur die Links an.

Je nachdem, was du vorhast...

Translate
aniri5j9ox8tw2ln
Legend
Jan 26, 2022 1:55 PM UTC

Danke! An sich ist das auch eine tolle Funktion von Bridge, aber nicht genau das was ich suchte...

Translate
Community Expert
Jan 26, 2022 12:55 PM UTC

Hallo aniri5j9ox8tw2ln,

mit welchem Mac OS bist Du unterwegs?

 

Wenn, dann müsste man das mit Apple-Script gehen.

Die verlinkten Dateien auslesen und denen dann eine Eigenschaft verpassen.

 

Bin aber auf Windows 10 unterwegs und bei der praktischen Umsetzung keine Hilfe.

Dort gibt's das Einfärben von Dateien im Dateisystem nicht.

 

Gruß,
Uwe Laubender

( ACP )

Translate
aniri5j9ox8tw2ln
Legend
Jan 26, 2022 1:54 PM UTC

Ich bin mit MacOs Monterey unterwegs...

Hmm dann werde ich mich mal informieren ob ich Hilfe bezgl. Apple Script bekommen kann.

Danke!

Translate
aniri5j9ox8tw2ln
Legend
Jan 26, 2022 9:08 AM UTC

Die englische Übersetzung ist nicht ganz korrekt, ich meine für Verknüpfungen die "Links"!

Translate