Code: Select all
selectedLayers = app.project.activeItem.selectedLayers;
layerSlice=selectedLayers.slice(a, b);
I ended up building my own replacement:
Code: Select all
function mySlice(inputArray, startIndex, sliceLength){
//this returns two arrays: first a slice of the original containing
//sliceLength elements from the input starting with startIndex
//and a second containing the rest of the original array
outPutArray=[];
sliceArray = [];
for(var i=0; i < inputArray.length; i++){
if((i < startIndex) | (i >= startIndex + sliceLength)){
outPutArray.push(inputArray[i]);
} else {
sliceArray.push(inputArray[i]);
}
}
return [sliceArray, outPutArray];
}