Could anyone assist me on this?
try putting all geometricBounds of textframes in an array, and include an ID, which looks like this: [[y0,x0,y1,y2,ID],[y0,x0,y1,y2,ID],[y0,x0,y1,y2,ID]]
then sort them in a new array by comparing the y0's and x0's and push them into the array.
now you can loop through them based on the order of ID's.
first think of an if statement that allows you to get the positions.
another thing worth trying is to revert the loop for the textframes. the order of indexes is bottom-top, but since new items are usually are placed after an old one, the new ones are on top, and are epxorted as first.
I am looking for a script that can export text as RTF from InDesign based on pagewise. Can you please share your script?