title: How to change textframe creation order in Indesign
body: <p>I am writing a script for Indesign. In that script I am taking the contents of the textframes and save them to a database. Till here my script works. However when looping between textframes script uses creation order. I want to save to database in question order. </p>
  
  <p>Here is my script:</p>
  
  <pre><code>var myDocument = app.activeDocument;var frameList = myDocument.textFrames;
  for (var i = 0; i &lt; frameList.length; i++){ 
      var txt=frameList[i].contents;
      SaveToDB(txt);
  }
  </code></pre>
  
  <p>So is there a way to change creation order of textframes</p>
  
  <p><img src="https://i.stack.imgur.com/911e0.png" alt="Indesign I&#39;m working with"></p>