Most of the machines in my studio are running cs5.5 or cs6 but one machine is running 5.1 - we have been using this script on all the machines:
#target photoshop
function main(){
if(documents.length != 1) return;
// Open psd with the layers to copy
var PSD = new File("/Applications/Adobe Photoshop CS6/Presets/Scripts/Script_Resources/moreLengthsOverlayTemplate.psd") ;
if(!PSD.exists) return;
open(PSD);
selectAllLayers();
activeDocument.activeLayer.duplicate(documents[0]);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
}
function selectAllLayers() {
var desc29 = new ActionDescriptor();
var ref23 = new ActionReference();
ref23.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc29.putReference( charIDToTypeID('null'), ref23 );
executeAction( stringIDToTypeID('selectAllLayers'), desc29, DialogModes.NO );
}
main();
but i have one troublesome machine that is giving me issues.
here are some screen shots to illustrate what is happening:
I'm not terribly script saavy and I am not sure if this is just because the machine in question is running cs5.1 or if theres some other problem.
Thanks for your help!


