Article View: adobe.scripting.indesign
Article #8726Hyperlinking Issues with InDesign Script
From: Katie_Eccleston
Date: Wed, 27 Sep 2006 20:54
Date: Wed, 27 Sep 2006 20:54
15 lines
2066 bytes
2066 bytes
Hi all, I am working on a script that will automate the hyperlinks in a document. I have it working, however, I have a couple of issues that I hope you can help me with. First of all, there will be numerous hyperlinks in the document, all with various formats. At the moment, I have used the following to recognize the text that needs to be linked: var myRegExp = /http(:\/\/)[\w+]*(.)[\d]*[\w+]*(.)[\d]*[\w+]*(.)[\d]*[\w+]*/g; The problem with this code is that if the resulting hyperlink does not contain EXACTLY the number of sections between periods, it does not work correctly. I need it to be flexible and pick up the variety of \ and . AND the text in between instead of only looking for a certain number of sections in the link. I hope this makes sense! Help! Also, I am wondering if there is a way in InDesign to turn a link the standard blue with an underline...I can't stand that InDesign only puts rectangles around the text...it should be moer flexible. Any suggestions? Lastly, and maybe most importantly, I have a script that detects hyperlink text....but it will only run ONCE and ONCE alone. Does anyone have a suggestion for code that will ensure that the script can be run over and over again, ignore the links that were made the first time it was run, and only pay attention to the new ones? Any help is MUCH appreciated!! K
Technical Details
Message-ID:
<3bc1cd8b.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,d5d2496634d5a1bb,start X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Katie_Eccleston@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Hyperlinking Issues with InDesign Script Message-ID: <3bc1cd8b.-1@webcrossing.la2eafNXanI> Date: Wed, 27 Sep 2006 13:54:03 -0700 Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit