Copy a word with a Paragraph style into another field in the same page
Hi There, I'm completely new in the scripting world in indesign but I think I need one to make faster some steps in my job. I have a page of a book, for exemple, containing Titles with a specific paragraph style. Titles are numbers. I need a text field in the top of the page that contains (in authomatic) the first Title, a minus sign and then the last Title present in the page (but with another style). It is possible to do it with a script?
Exemple: This is my page
104 (Title)
bla blabla blabla blabla bla (text)
105 (Title)
bla blabla blabla blabla bla (text)
106 (Title)
bla blabla blabla blabla bla (text)
In my Textfield I need 104-106
It is possible? How can I do That?
PS. (more difficult) If the page don't start with a "Title" I need the previous "Title" in my field...
Exemple: This is my page:
bla blabla blabla blabla bla
bla blabla blabla blabla bla (text)
105 (Title)
bla blabla blabla blabla bla (text)
106 (Title)
bla blabla blabla blabla bla (text)
In my Textfield I need 104-106
Thanks a lot for the help.
Paolo
