I'm afraid that the order of selection is not available to scripts (although, from postings by Peter Kahrel, it might have been available in CS2 days -- except that you seem to be denying this).
It is possible to determine the selection order using APID events,
but it requires APID ToolAssistant to be installed and it's a rather
Here's a link for info on APID...
when you select objects in ID CS1 and ID CS2 - order is reversed - so you need to iterate objects backward:
For i = myInDesign.Selection.Count to 1 Step -1
in ID CS3 - this was changed and reflect order of creation or stacking index ...
I didn't tested it in ID CS4 ... but I don't think that it was fixed ...
I did try reversing the order but the results weren't consistent.
It does seem to be the stacking order or creation order, which isn't what I need.
Well blow me down if it isn't working now.
Have a working script thanks to the help and advice on this forum.
Many thanks to all.
Hi John, What's the working script that you have that can resolve this 'bug' in CS3 and CS4.
Please share with us... please.
I think he meant it worked in CS2...
Yes, just to be clear, the script works in CS2. I haven't tested it with any other version.
There's no need to even have this script in CS2.
The order is by default according to the selection order and not like CS3 or CS4 by object creation order.
Irony.. that's the fantastic 'feature' of CS2 compared to it's new brothers!!