This content has been marked as final. Show 3 replies
Ah, I have been thinking too complicated this morning.
I am getting what I want to with this code:
var d = app.activeDocument;
myItems = new Array;
for ( i = 0; i < d.masterSpreads.length; i++ )
for ( k = d.masterSpreads[i].pageItems.length-1; k >= 0; k-- )
Never mind the layers!
The order of the items is the order of their position.
>I am afraid of Peter's answer in ...
Afraid? Sounded pretty innocent, didn't it ;)
my english writing runs the risk of causing confusion.
I have been expecting something like doc.layers.masterPageItems or doc.masterSpreads.layers.pageItems.
But I have been afraid that I wouldn't get something like this, but the instruction, to do it by myself using if-querries and creating a two dimensional array (one for the layers and one for the order of the pageItems within a layer) to sort the items of the array afterwards.
After all, this sounds pretty innocent.
But it also sounds as a lot of work to do around. ;-)