Skip to main content
Inspiring
August 8, 2012
Question

Set first line indent to 0

  • August 8, 2012
  • 1 reply
  • 1448 views

Hi guys!

Wondering if there's a scipt to set the first line indent to 0 (just affecting the selected paragraph)?

In my parapraph style i've set first line indent to 3 mm, but i don't want text after header to have indent.

I've scanned the web for solutions but just found complex scripts, that seems to be limited to one named paragraph style.

I don't want my script to be limited to a specific paragraph style, but rather a general script appliable on different paragraph styles in different documents.

I've tried scipts like:

tell application "Adobe InDesign CS5.5"

     set first line indent to 0

end tell

No success.

I'm, as you've probably figured out, very new to scipting.

Someone?

BR

Henrik

This topic has been closed for replies.

1 reply

Inspiring
August 8, 2012

JavaScript rather than Applescript:

if (app.selection.length && app.selection[0].hasOwnProperty("baseline")) {

    app.selection[0].firstLineIndent = 0;

}

But... why not just make styles based on your indented ones but with the first line indent set to 0 and apply those with shortcuts? No overrides that way and no need for scripts.

Jeff

Inspiring
August 9, 2012

Thank you Jeff!

Worked like a charm =)

Yes i could use a non intended style based on my indended style, but then every document would need to have paragraph styles.

Sometimes, in smaller documents, i don't use the styling option, then this script would make my day.

Again, thanks!