Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Alphabetize text frames, duplicate and make a list in order

$
0
0

I am trying to take the selected text, sort it alphabetically, then duplicate all the text so it comes out in a list form.

So if I had the following text selected....

selected text.JPG

And ran my script....which I have just a vague start on...

#target illustrator
var doc = app.activeDocument;
var selectedItems = doc.selection;
var alphaList = [];


for (i = 0; i < selectedItems.length; i++){  alphaList.push(selectedItems[i]);  }
alphaList.sort();

 

The results would be this....

Capture.JPG

Anyone have any guidance for me? Thanks in advance!


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>