0 Replies Latest reply on Oct 21, 2013 1:49 PM by McShaman

    Find duplicate text destinations (hyperlinks)

    McShaman Level 1

      I am trying to write a script for managing hyperlink text destinations. One of the functions it to help manage duplicate destinations... Often these can build up without the designer knowing.


      I have been researching everywhere but been having a hard time working this part out.


      This is how I am thinking my logic should work:

      1. Function takes a textDestination (insertionPoint) as an argument
      2. Function looks at the next character in front
      3. If this character is another textDestination delete it


      Seems simple enough... However I can't work out:

      1. How to find where within a story the textDestination originates
      2. How to look ahead to the next character
      3. And if I can look ahead to the next character will I be able to tell if it is a textDestination?