Have an account? Sign in
"*" indicates required fields
You agree that CreativePro Network may send you emails, including the newsletter selections above. You can unsubscribe at any time.
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
New user? Create an account
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
I’m very new to scripting and have spent half the day teaching myself and trying to find the parts to build a simple script.
This is the closest I’ve found to a solution, but it’s not quite what I need.
I’m attempting to write a script that will change the color of my InDesign layers based on the layer name. “Art” = Red, etc.
This and similar scripts makes it very easy to do this with new layers.
I’ve also found a script that will search for particular layers, and if they do not exist in the document, will add them, and set them to a particular color. If the specified layers already exist in the document, it will ignore it and go on to the next layer.
So I need to find an existing layer and change its color. Seems like it should be easy. Is it?
What I’ve been trying to do is take this line:
app.documents[0].layers.add ({name: ‘die line’, layerColor: UIColors.RED}).move(LocationOptions.AT_BEGINNING);
and use the relevant bits of code on an existing layer. Can I replace the “.add” with something else to achieve this?
This site uses cookies, but not the kind you eat. We use cookies to remember log in details, provide secure log in, improve site functionality, and deliver personalized content. By continuing to browse the site, you accept cookies.