title: With Indesign, how to reproduce a sequence of menu commands via script?
body: <p>I have an Indesign (CC2015) doc like this:</p>
  
  <p><img src="https://i.stack.imgur.com/5cQmW.jpg" alt="n pairs of ovals and polygons"></p>
  
  <p>Manually, I can obtain <code>n</code> paths with this menu command sequence:</p>
  
  <ol>
  <li>Select all</li>
  <li>Object –> Pathfinder –> Add</li>
  <li>Release compound path</li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/iqguR.jpg" alt="the result"></p>
  
  <p>How can I get the same result with a script using Applescript or Javascript?</p>