Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks again all who helped me with this script. It's great and it's handy.
I have another need for a very similar script which I think many others would find useful. I have tried to find out how to change this script or make a new on my own but it's not easy to find out how. (JavaScripting Illustrator pdfs).
Here is what I would like to see:
A script that would make x number of layers with specific names.
One would be able to edit the names of the layers in the script to use the same setup over and over and have a few different scripts ready.
The idea is to make different layer sets for specific jobs.
One would maybe make layers called: Background, Pictures, Text, Guides
Another maybe: Background, Pictures, Text 1, Text 2, Headlines, Extras... all editable in the script.
Any help?
What I find frustrating, since I am not a scripter is to read in the manual that to make a new layer is: Add () What? Very few samples and much time needed to learn. I promise I will try to get better into this but making this little script is too much for me as a starter.
Thanks in advance.
Copy link to clipboard
Copied
I played around with the ExtendScript Toolkit and cutted and pasted the previous script from here until I managed to get a script that actually works like I was thinking. I then added a code from the CS4 Reference Manual to move Layer1 to the top (just to see if it worked).
I have no idea yet if the the code includes something that does not belong, but at least I get no errors. The current code is like this now:
//Apply to myDoc the active document
var layerName = LayerOrderType;
var myDoc = app.activeDocument;
//define first character and how many layers do you need
var layerName
var numberOfLayers=0;
//Create the layers
for(var i=0; i<=numberOfLayers; i++)
{ var layerName = "Background"; var myLayer = myDoc.layers.add(); myLayer.name = layerName; }
{ var layerName = "Picture"; var myLayer = myDoc.layers.add(); myLayer.name = layerName; }
{ var layerName = "Text"; var myLayer = myDoc.layers.add(); myLayer.name = layerName; }
{ var layerName = "Guides"; var myLayer = myDoc.layers.add(); myLayer.name = layerName; }
// Moves the bottom layer to become the topmost layer
if (documents.length > 0) {
countOfLayers = activeDocument.layers.length;
if (countOfLayers > 1) {
bottomLayer = activeDocument.layers[countOfLayers-1];
bottomLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
}
else {
alert("The active document only has only 1 layer")
}
}
Copy link to clipboard
Copied
and if i wanna add and ai file in this same layer? can i do that?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now