fabianmoronzirfas
5/10/2012 - 5:38 PM

Alert selection in illustrator

Alert selection in illustrator

// InDesign & Illustrator
var firstListItem = app.activeDocument.selection[0]; // first object in selection 
if(firstListItem instanceof TextFrame){ /* check the type */
alert("I am a " + firstListItem.constructor.name);    // and name it
}
app.activeDocument.selection;