I've been trying to create some textFrames via code and also tried to use the TextPencil script I found on the site:
it seems that the textFrames are created, but they are empty. (or contain unknown size letters - the textframe shows the red Wrapping button [+] but never shows any text, not even when i try to edit it, etc.
I did find out that when i save a file that I tried using textpencil on to SVG, suddenly all the letters appear (with my textframes from my other script as well.)
Also, I was trying to write a quick script to reverse text within selected frames -> console messages sometimes doesn't show up (unless there's something i'm missing) - and sometimes the same code seems not to work - also, Illustrator sometimes completely crushes when I try those things.
code:
function reverseText() { var selection = activeDocument.selectedItems; var textFrameCount = 0; for (var i = 0; i < selection.length; i++) { item = selection[0]; if (item instanceof TextFrame) { textFrameCount++; var textFrame = TextFrame(item); var text = textFrame.getContent(); var newText = ""; for (var j=0; j<text.length; j++) { newText = text[j] + newText; } textFrame.setContent(newText); } } if (textFrameCount == 0) { Dialog.alert("no text frames are selected.") } }