textFrames bug in the Illustrator CC 2020 (v.24.3)

Change numbering in real time

Bug demo

addText();
redraw();
alert('Done');
undo();
addText();
function addText() {
var str = activeDocument.textFrames.add();
str.textRange.characterAttributes.size = 16;
str.contents = 'Example';
str.top = 0;
str.left = 0;
}

Conclusion

var AI_VER = app.version.slice(0, 4);
if (AI_VER == '24.3') isPreview.enabled = false;

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store