Scripting for adding a stroke to the text active or to texts that converted to outline
Dear All,
I've tried some ways to create a script that able to add a stroke into text or text that converted. I need a help for that, thanks..
Below is my current script:
#target illustrator
var sel = app.activeDocument.selection;
var obj = sel; // selected the text that I converted or text active.
for (var i = 0; i <obj.length; i++){ // I've tried some, like change "length" to groupItems, compoundPathItems, pathItems, even added the "length" after its (pathItems.length) and its doesn't work.
var textConvertedToOutline = obj[i];
textConvertedToOutline.stroked = true;
textConvertedToOutline.strokeWidth = 5;
textConvertedToOutline.strokeColor = textConvertedToOutline.fillColor;
}
This script only work to rectangle and if for text that converted to outline, I have to released it into compound path..
Thank you,
Regards,
Riko
