Site logo

Auto hyperlink script (outdated)

Script for InDesign CS3 from Nobrainer Scripting. I updated it to make it works in InDesign CS3. The current version is here.

Download the package, unzip and install into Scripts Panel folder — both files: AutoHyperlink CS3.jsx and NamesAndURLs.txt should be in the same folder.

Edit NamesAndURLs.txt file in a text editor that doesn't format text, e.g. Notepad. The file contains tree sample lines, replace them with your own. Each line consists of two columns separated by tab. The first line is a text that will be converted to hyperlink, the second is the URL address for this link.

Example:
Type "Adobe", press Tab key, type "http://www.adobe.com/", press Enter/Return key to go to the next line, and so on.

The InDesign document should have a character style named "hyperlink". You can change it to whatever character style you want — just edit the following line in the script:
var myHyperlinkStyle = myDocument.characterStyles.item("hyperlink");

The script searches for every text entrance you defined in the first column, converting it to hyperlink with destination taken from the second column, and applies "hyperlink" character style to it.

Before

After

Click here to download the script.