Skip navigation
Pete Street
Currently Being Moderated

Grouping Words

Jul 3, 2011 3:38 PM

Hello!

 

I'm thinking about attempting my own kinetic typography video, following the tutorial here:

 

 

I'm  sort of stuck at the beginning, when he's grouping the letters into  words inside Illustrator.  My problem is this -- I have a large volume  of text I'm using, and selecting and grouping each individual word by  hand is unreasonably time-consuming.  Is there a faster way to do this?

 

I'm  not very familiar with Illustrator, but I understand that once I create  the outlines for all of the text, it is treated as a generic object  rather than text, correct?  Would it be possible to group all of the words  into different layers first, and THEN create outlines on them?  Or is  there some other way (a script, or even some other software) capable of doing this  job faster?

 

Thank you for the help!

 
Replies
  • Currently Being Moderated
    Jul 3, 2011 8:17 PM   in reply to Pete Street

    here you go, do like the example shows, make a text frame on a blank document, paste your text and run the script. I just stacked all the words on top of each other.

     

    #target illustrator
     
    // script.name = outlineTextMoveWordsToLayers.jsx;
    // script description = creates outlines and moves each word to a separate layer;
    // script.required = one document with all text in one textFrame;
    // script.parent = CarlosCanto // 7/3/11;
    // script.elegant = false;
     
    var idoc = app.activeDocument;
    var itext = idoc.textFrames[0];
    var allwords = itext.words;
    for (i=0; i<allwords.length; i++)
         {
              var ilayer = idoc.layers.add();
              ilayer.name = "layer"+i;
              var itext2 = itext.duplicate(ilayer);
              itext2.contents = allwords[i].contents;
              itext2.createOutline();
         }
    

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 4, 2011 1:00 AM   in reply to Pete Street

    no problem, here's version 1.2

     

    #target illustrator
     
    // script.name = outlineTextMoveWordsToLayers1.2.jsx;
    // script.description = creates outlines and moves each word to a separate layer;
    // script.required = one document with all text in one textFrame;
    // script.parent = CarlosCanto // 7/4/11;
    // script.elegant = false;
     
    var idoc = app.activeDocument; // get activeDocument
    var itext = idoc.textFrames[0]; // get top most textFrame
    var content = itext.contents; // get frame contents
    var allwords = content.split(/\s/g); // get array of words, separated by single space \s
     
    for (i=0; i<allwords.length; i++) // loop thru array elements
         {
              var ilayer = idoc.layers.add(); // add new layer
              var itext2 = itext.duplicate(ilayer); // duplicate original text, move to new layer
              itext2.contents = ilayer.name = allwords[i]; // name new text frame and layer same as array word item
              itext2.createOutline(); // create new text frame outlines
         }
    

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 4, 2011 1:54 PM   in reply to Pete Street

    it's not too weird of a request, this version deals with "double spaces" too.

     

    version 1.3

     

    #target illustrator
     
    // script.name = outlineTextMoveWordsToLayers1.3.jsx;
    // script.description = creates outlines and moves each word to a separate layer, separates words with slashes too;
    // script.required = one document with all text in one textFrame;
    // script.parent = CarlosCanto // 7/4/11;
    // script.elegant = false;
     
    var idoc = app.activeDocument; // get activeDocument
    var itext = idoc.textFrames[0]; // get top most textFrame
    var content = itext.contents; // get frame contents
    var content = content.replace("/"," / "); // add spaces at both ends of slashes
    var allwords = content.split(/\s+/g); // get array of words, separated by spaces
     
    for (i=0; i<allwords.length; i++) // loop thru array elements
         {
              var ilayer = idoc.layers.add(); // add new layer
              var itext2 = itext.duplicate(ilayer); // duplicate original text, move to new layer
              itext2.contents = ilayer.name = allwords[i]; // name new text frame and layer same as array word item
              itext2.createOutline(); // create new text frame outlines
         }
    //alert(idoc.layers.length); // debugging, count layers
    

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 4, 2011 10:30 PM   in reply to Pete Street

    no problem, you're welcome

     

    400 posts!!! yahoo!!

     

    Message was edited by: CarlosCanto

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2012 4:35 AM   in reply to CarlosCanto

    Hi There!

     

    Just found this through a search, this exactly what I'm after, except I have a paragraph of text that I need to stay as it is (i.e the positioning of each word)

     

    The script above re-positions all of the text up in the top left corner, whereas I need each word to hold its position within the paragraph of text, if that makes sense. Is this at all possible?

     

    Thanks very much!

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2012 8:27 AM   in reply to dreamdata

    do you still need the words moved to separate layers? if you don't, look here, there is a couple of "break apart" scripts

     

    http://forums.adobe.com/message/3943700#3943700

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2012 11:45 AM   in reply to CarlosCanto

    Hi Carlos, thanks for your reply,

     

    As far as I know I do need them on seperate layers, as after I have split and grouped them, I will need to alphabetize the layer order (which I think I have found a script for)

     

    I've tried out the scripts in the thread you posted, but these reposition the words too.

     

    If this helps to elaborate; the text frame I am working with is justified and I need each individual word to keep it's own x and y position.

     

    I saw something about the "break apart" feature in Corel Draw mentioned in the linked thread too. Do you think using that might be better to get the text seperated and positioned seperately?

     

    Thank you for your time, it is much appreciated!

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2012 12:55 PM   in reply to dreamdata

    that script was designed for a one liner text frame, if you have multiple lines it will turn them into one line...let me see if I can make it work for multiline textframes.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points