Forced change of paragraph properties

Problem

var str = activeDocument.textFrames[0].paragraphs[0]; str.paragraphAttributes.firstLineIndent = 20;
Zeroing the indent bug

Solution

var str = activeDocument.textFrames[0];
str.resize(200, 200); // Uniform scale to 200%
str.paragraphs[0].paragraphAttributes.firstLineIndent = 0;
str.resize(50, 50); // Uniform scale to 50%
Bug fix

Align left fix

var str = activeDocument.textFrames[0];
var pos = str.position;
str.resize(200, 200); // Uniform scale to 200%
str.story.textRange.justification = Justification.LEFT;
str.resize(50, 50); // Uniform scale to 50%
str.position = pos;

--

--

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