Send backwards
Hi. How do you code it in javascript to send a layer backwards, as in Layer > arrange > send backward? It#s part of a simple script that has two layers and I need to arrange them so the new layer moves from the top to underneath the other layer.
I've got it as the following, but I'm after something cleaner ![]()
// =======================================================
var id122 = charIDToTypeID( "move" );
var desc28 = new ActionDescriptor();
var id123 = charIDToTypeID( "null" );
var ref10 = new ActionReference();
var id124 = charIDToTypeID( "Lyr " );
var id125 = charIDToTypeID( "Ordn" );
var id126 = charIDToTypeID( "Trgt" );
ref10.putEnumerated( id124, id125, id126 );
desc28.putReference( id123, ref10 );
var id127 = charIDToTypeID( "T " );
var ref11 = new ActionReference();
var id128 = charIDToTypeID( "Lyr " );
var id129 = charIDToTypeID( "Ordn" );
var id130 = charIDToTypeID( "Prvs" );
ref11.putEnumerated( id128, id129, id130 );
desc28.putReference( id127, ref11 );
executeAction( id122, desc28, DialogModes.NO );
Cheers
