Copy link to clipboard
Copied
Hello!
I'm wondering if someone knows of or know how to write a script for target selecting all layers that you have highlighted?
The reason I'm wondering is because I would like to target (circle) select multiple layers at once simply by clicking at one layer, holding down shift (for PC) and then click on another layer in the layer list and that would select all layers in between. For some in explainable reason this can not be done in Illustrator 6 and CC (despite the fact that this is very basic and standard in all other programs). You can do this (shift select) if you are only looking to highlight select the layers but I need to do both without clicking 50+ layers every time.
Does anyone know of a script for doing this? I tried this script but I can not get it to work:
Copy link to clipboard
Copied
Do you mean you want to 'select all the artwork on the layer by clicking the circle on the right side of the layers panel'? Or do you just want to highlight a range of layers? The latter works fine for me, so i imagine you're trying to do the first one..
Copy link to clipboard
Copied
Yes, I'm trying to select everything in the layer by circle selecting/ target selecting a bunch of highlighted layers.
I know you can highlight select using shift but for some odd reason you can not do the same with target select.
Copy link to clipboard
Copied
You can:
1. Shift click to highlight
2. Lock others( in the fly menu of "Layers" panel)
3. Ctrl + A to select all
Copy link to clipboard
Copied
this works so long as none of the layers you want to select are currently locked. You'd have to unlock everything first, then highlight, then lock others and finally select all.
Great simple solution.
Copy link to clipboard
Copied
try changing the last loop to
var mylayers = get(); // get the highlighted layers
app.activeDocument.selection = null; // clear any selection
// loop through the array of highlighted layers
for (var i = 0; i < mylayers.length; i++) {
// unhide and unlock layer, then select all the artwork in that layer
mylayers.locked = false;
mylayers.visible = true;
mylayers.hasSelectedArtwork = true;
}
Copy link to clipboard
Copied
Zertle: Okej, that kind of worked...
Problem is that it selects the layers with that little colored square to the right or the circle. This means that everything IN that layer is selected BUT not the actual layer itself. If you try and add say appearances it is not applied to the layer but rather to each individual object in that layer.
Is there a way to change it so it target/circle selects the highlighted layers?
Copy link to clipboard
Copied
OK, I know what your mean, Ctrl+A do select all the objects in the highlighted layers, but not the layers themselves.
Sad to say, that's impossible using script too.
If you want to add effects to multi-layers at once(which is the only situation you have to select layers like that, as i think), may be you can collect all these layers to a new layer, then add effects to the new layer.
Copy link to clipboard
Copied
Ok, thanks for all your answers. That's too bad!
Adobe: I'm still amazed how something so simple isn't a standard feature since the first release.
Copy link to clipboard
Copied
What were you changing after selecting the layers? That step might be something that could be scripted, cut out the middle man, so to speak.
Copy link to clipboard
Copied
moluapple & williamdowling:
I can't get that to work at all. I can highlight and lock others but when i hit ctrl+A nothing happens at all.
PS: I'm using CS6 and windows.
Copy link to clipboard
Copied
You can do it with lasso tool. Select your shape or path with lasso tool and hold shift to draw on other areas to select multiple or select your one shape and go to select menu Select > Same > Shape or other options in menu.
I hope it helps.