looking to hyperlink two character styles
I'm very new to scripting and even the concept of using scripts. I've got InDesign CS4. I have several documents with endnotes (some with as many as 130). I'm working on exporting them all as ePub files. I've already got all of their numbers and the footnote numbers in the text assigned to a specific character style. What I'm wondering is if it is possible to create a script to link each instance of one character style to its corresponding number in another character style, or does anyone know of a script that has already been created to do this?
As an example, it would find all of the numbers that have been assigned a character style of "footnote" in the text and link them to the same numbers (1 to 1, 2 to 2, etc.) with the character style "footnote destination". The end product then would allow a user to click on a footnote number, be taken to the note, then click on that note's number and be taken back to where they left off in the book.
Any ideas?
Rob