Hi all,
I have a script that is used to tidy up a file before it is sent out. As a part of this i need to be able to unlock layers and make them visible, i have used this sample script that I have below without problems in the past but i am suddenly getting these errors, could someone please explain why?
function UnlockLayers(){
// Loop through the docs layers and capture the locked states of each one.
for ( var i = 0 ; i < app.activeDocument.layers.length; i++ ) {
// Unlock/Unhide layers here
app.activeDocument.layers[i].locked = false;
app.activeDocument.layers[i].visible = true;
}
}
Thanks to anyone that has any suggestions,
Tom