Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: Scripting Error

$
0
0

Dave,

 

Great minds think alike. I finally realized that I was coming at this from the wrong angle.

 

What I need to do is determine the number of hyperlinks in the document, and, as you said, examine each one and and determine its cross-reference format and then change it accordingly.

 

I'm hacking at the script now. There are some things I'm not sure of yet.

 

I know I need to start by determining the number of hyperlinks in the document and then do a for loop to sort through each one.

 

Then, I think I need to determine the index of its cross reference format and re-assign it accordingly.

 

Here's the snippet I've come up with so far:

 

var NumHyper = app.activeDocument.hyperlinks.count();

 

for (i=0; i<NumHyper; i++){

    if (app.activeDocument.crossReferenceFormats[0].isValid){

        var Link = ???

        Link.source.appliedFormat = "Paragraph Text"}

    }

 

What I'm not sure of is how to get the hyperlink contents using the hyperlink index as the starting point. Am I on the right track, finally?


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>