Remove indent after paragraph
I'm new to scripting and I have a problem that scripting might be able to fix.
I have body text with indent but after headlines in the body text the indent sholud be removed. My editorial program only allowes me to use one paragraph style for the body text. When the text is placed on the page everything works fine because the editorial program fixes the text so that indent after headlines in the body text are removed.
But when the pagemakers move the hadlines the indent doesn't follow. Making indents is simple by using the paragraph style and to remove the indent I now use a script.
THis made me thinking.
Is it possible for a script to:
1. Identify all headlines in the body text (the paragraph style is called Mellanrubrik)
2. Remove the indent on the body text paragraph that follows
I have tried using this but I don't know what to write between the commands.
if (appliedParagraphStyle=Mellanrubrik)
app.selection[0].firstLineIndent=0
Best regar
ds
Mikael Wiik, Sweden