Skip to main content
aniri5j9ox8tw2ln
Legend
January 26, 2022
Answered

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

  • January 26, 2022
  • 4 replies
  • 2547 views

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!

Correct answer m1b

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);
    }
}

 

4 replies

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
January 27, 2022

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);
    }
}

 

aniri5j9ox8tw2ln
Legend
February 27, 2025

Hello Mark, I don't know why but your script doesn't work anymore. I get an error message. Did something change because Indesign is now a different version? Thank you!

Community Expert
February 27, 2025

@aniri5j9ox8tw2ln said: " … I get an error message".

 

Hi @aniri5j9ox8tw2ln ,

what does that message say?

Well, and did you update your macOS recently?

What version are you running?

Perhaps something on the AppleScript side of coding changed?

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Jens Trost
Inspiring
January 26, 2022

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...

aniri5j9ox8tw2ln
Legend
January 26, 2022

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

Community Expert
January 26, 2022

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 )

aniri5j9ox8tw2ln
Legend
January 26, 2022

Ich bin mit MacOs Monterey unterwegs...

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

Danke!

aniri5j9ox8tw2ln
Legend
January 26, 2022

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