Assign a different Paragraph Style to text exceeding textframe
I posted this question here: Poetry book text formatting
I'm currently working on a poetry book layout and I came up with this struggle:
I have some long lines that don't fit in a single line and (without changing paragraph) and I'd like to have all of those extra lines automatically being right justified.
I tried using nested line style, but I only manage to apply a different Character Style (not a paragraph one) on the second line.
Is there a way to achieve what I need without having to manually format every "exceeding line"?
To say it in other words I need to have all lines longer than the text box right justified.
I hope I was clear enough (if not sorry, english is not my mother tongue).
User DBLjan suggested me to try with a script: "Find out which paragraph exceeds the textframe. Scripters can tell you, if theres a value for this, or if you have to find out the hard way: Compare first characters baseline y with the last character baseline y. If they differs, your line exceeds the textframe – now the script could apply another paragraph style for the right alignment", but I'm totally noob in scripting and I have no idea where to start...
Can anybody help?
Edit: See picture for a reference