Skip navigation
Currently Being Moderated

Set first line indent to 0

Aug 8, 2012 12:30 AM

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

 
Replies
  • Currently Being Moderated
    Aug 8, 2012 11:18 AM   in reply to Henrik Lideberg

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points