Question
UXP Script to select the layer directly above/under the currently selected layer including hidden?
I use this code to select the above/under the currently selected layer, but this script skips the hidden layer.
How do i modify the script to include the hidden one?
async function selectLayer(executionControl, direction) {
await batchPlay(
[
{
_obj: "select",
_target: [
{
_ref: "layer",
_enum: "ordinal",
_value: direction === Directions.up ? "forwardEnum" : "backwardEnum",
},
],
makeVisible: false,
_options: {
dialogOptions: "dontDisplay",
},
},
],
{},
);
}
