Select and move to new layer
Hi - i was wondering if anyone can help? A while back someone kindly supplied me this script which will move all my text which has been coloured up in a specific colour to a new layer. Along with the text we also use leader lines for diagrams which are also coloured up in the same colour. Is there a way of also selecting lines that have been produced either with the pen tool or the line tool and move those to the same layer. The only thing they have in common is they are coloured up in the same colour.
Many thanks
var myDoc = app.activeDocument;
try{
var myLayer = myDoc.layers.add({name:"Text Black"});
}catch(e){myLayer = myDoc.layers.item('Text Black')};
myDoc.textFrames.everyItem().itemLayer = myLayer;