Skip to content

Max Seidman

My feedback

2 results found

  1. 15 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Max Seidman commented  · 

    Well here we are 7 years later and I still want this and they still haven't added it, so here's my solution for everyone. I have created a script to handle this for you. Instructions are in the script:

    /*====================================

    HOW TO USE
    1. Create an Indesign file called "Icon Library"
    2. Paste or place all of your inline text icons into the Icon Library
    3. Make sure the icon is exactly the size you want it. A good way to ensure this
    is to make a test document with the icon inline, then copy paste it to the Icon Library
    4. Name the icon layer whatever you want, but that's the placehold text you put in your text to replace\
    I recommend using [[Icon Name]]
    e.g. if you name the icon layer [[Gold]], the script will replace all instances of "[[Gold]]"
    in your text with that icon
    5. Run the script!

    ADVANCED USE
    6. You'll notice that your icons are much higher up in the text box than they should be
    7. To fix this, in the icon name in the layer panel, after the text you want to replace,
    add a number after an exclamation pooint (like !-10). This will adjust the icon
    that many pixels when running the script. So [[Gold]]!-10 (still keeping [[Gold]] in your text)
    8. A quick way to figure out what the adjustment number should be is to have a test document in
    InDesign and put the icon in the text like you want it, then select the inline icon and go to
    Objects --> Anchored Object --> Options and copy the Y Offset

    ====================================*/

    var document = app.activeDocument;
    var pages = document.pages;
    var layers = document.layers;

    //Look for an open document called Icon Library
    var iconLibDoc = app.documents.itemByName("Icon Library.indd");

    //First, get the icons in the first layer of the icon library
    var iconLibraryLayer = iconLibDoc.layers.firstItem();

    //Next, duplicate them into the main doc.
    //For each icon in the layer, duplicate it to the active document and add it to a list.
    var dupedIcons = [];
    var iconsToDupe = iconLibraryLayer.allGraphics;
    for (var i = 0; i<iconsToDupe.length; i++){
    dupedIcons.push(iconsToDupe[i].parent.duplicate(layers[0])); //Note that we grab the parent, which is the frame in the layer, not the graphic itself, in order to preserve the name
    }

    var mergedIcons = [];

    //for each icon in the Icon Library, back in the main document
    for (var i = 0; i<dupedIcons.length; i++){

    var icon = dupedIcons[i];

    //first, we check to see if we've already merged this icon
    var notYetMerged = true;
    for (var j = 0; j<mergedIcons.length; j++){
    if(mergedIcons[j]===icon.name){
    notYetMerged = false;
    }
    }

    //if we haven't already merged this icon
    if(notYetMerged){

    //select the icon, then copy it to clipboard
    app.select(icon);
    app.copy();

    //first, separate the anchored object adjustment number (anything after a ! in the layer name)
    //it's going to replace things that have the left of the !, so [[Brute]]!-5 will replace all
    //[[Brute]] text in the text boxes with the contents of this layer
    var name = icon.name.split("!")[0];
    var adjustment = icon.name.split("!")[1];

    //Now, by default all anchored objects are placed at the top of the line of text. This is bad.
    //If the layer name has the style [[Brute]]!-5 we want it it to adjust the placement of the
    //anchored object down 5 units

    //alert("merging "+name+" with adjustment "+adjustment);

    //So by default set the anchored object setting back to 0
    document.anchoredObjectDefaults.anchoredObjectStyle.anchoredObjectSettings.anchorYoffset=0;
    if(!isNaN(adjustment)){ //then, as long as the adjustment is a number
    document.anchoredObjectDefaults.anchoredObjectStyle.anchoredObjectSettings.anchorYoffset=adjustment; //set the adjustemnt
    }

    //find all instances of the icon name in the text and replace with clipboard contents
    app.findTextPreferences=app.changeTextPreferences=null;
    app.findTextPreferences.findWhat=name;
    app.changeTextPreferences.changeTo="^c";
    var results = app.activeDocument.changeText();

    mergedIcons.push(icon.name);

    icon.remove(); //Finally, delete the icon from the main document (they're still fine in the library)
    }

    }

    Max Seidman shared this idea  · 
  2. 177 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Max Seidman commented  · 

    This would be an amazing feature. I do a lot of collaborative work on tabletop games in Google sheets and being able to take out the extra step of downloading and browsing for a new CSV from a Google sheet would save a lot of time.

    Additionally, Google Sheets has the ability to publish a CSV to the web from your Google sheet, so Adobe wouldn't even need to use Google's API—all that we need is the ability to give InDesign a URL for the CSV instead of a local file path.

    Max Seidman supported this idea  ·