Answered
SYMBOLS COUNT TABLE
It´s possible to make a script that writes a table with all symbols instances count ? how difficult it would be?
It´s possible to make a script that writes a table with all symbols instances count ? how difficult it would be?
moving to the new Forums ruined all existing scripts, try this version
var main = function() {
var doc;
if ( !app.documents.length ) {
alert("This scripts needs an open document !");
return;
}
doc = app.activeDocument;
var symbols = doc.symbolItems, n = symbols.length, nSymbol, db = {}, arr = [];
while ( n-- ) {
nSymbol = symbols[n].symbol;
db[ nSymbol.name ] = db[ nSymbol.name ] || 0;
db[ nSymbol.name ]++;
}
for ( prop in db ) {
arr.push ( prop+" : "+db[prop] );
}
var result = doc.textFrames.add();
result.contents = ( "Result:\r"+arr.join("\r") );
result.top = 700;
result.left = 400;
redraw();
}
main(); Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.