Going follow one of first sentence from "Adobe_intro_to_scripting" which says:
...Each scripting item corresponds to a tool or a palette or menu item in an Adobe application...
I am trying to discover how to reach effect which is obtained from InDesign UI: menu Text:create outline.
I mean situation when there is some text on path typed (any splineItem as a parent) and is selected as an item (not using text tool).
In UI: to create outline at this point means to create compound path from entire text and to remove a splineItem.
In script code: app.selection.createOutlines() gives error, cause this method is not available for splineItem.
One can create outline from text's on path character, word, parentStory, etc, but there are a set of separated characters converted into path and still anchored onto parent splineItem path.
If the goal is to have a compound path from entire text placed on path (keeping formats and effects) is ID UI only way to reach it?
Am I missing something?
I have a solution:
I am not sure if ID UI do it this way but script way to reach a goal could be:
app.selection.contentType = ContentType.TEXT_TYPE;
so converting a splineItem into a textFrame opens the possibility to use createOutline() method in global way for entire content.
using false as option creates a duplicate with same properties as from GUI ...
var splineItem = app.selection;
var wholeTextOneItem = splineItem.textPaths.texts.createOutlines(false)
Sometimes my knowledge splits into many open paths, but alike your's answers can covert it back into closed one