How to set fill, stroke & color to a group
First of all, I must say I'm a complete beginner in Javascript so please have patience with me.
What I'm trying to do is to set a lot of groups to specific fill, stroke & color using a function.
var docRef = app.activeDocument;
var Reg = docRef.swatches["[Registration]"].color;
var mm = 2.834645;
var lineWidth=0.12*mm;
group1.stroked=true;
group1.strokeColor = Reg;
group1.filled = false;
group1.strokeWidth = lineWidth;
This works, but I have to this for every group and there are lots of them.
So I tried to make a function:
function setAttributes(temp)
{
temp.stroked=true;
temp.strokeColor = Reg;
temp.filled = false;
temp.strokeWidth = lineWidth;}
And then call that function for each group:
setAttributes(group1);
setAttributes(group2);
setAttributes(group3);
etc.
Of course, this doesn't work since I have incredible programming skills ![]()
Please help.
Thanks!
