Javascript - deselect all layers
Is there a simple command to deselect all layers in the currrent document via javascript? I'm running a script which is getting fouled up if there is a layer selected in the document.
Is there a simple command to deselect all layers in the currrent document via javascript? I'm running a script which is getting fouled up if there is a layer selected in the document.
This will de-select all layers Mark...
function deselectLayers() {
var desc01 = new ActionDescriptor();
var ref01 = new ActionReference();
ref01.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc01.putReference( charIDToTypeID('null'), ref01 );
executeAction( stringIDToTypeID('selectNoLayers'), desc01, DialogModes.NO );
};
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.