Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 72601

Re: Only loop through links on Page (not pasteboard)

$
0
0

Hi newtoindesign

 

Give this a try. You may have to refine it further.

 

main();
exit();

function main() {
     var myDoc = app.activeDocument;    var myLinks = myDoc.links.everyItem().getElements();    for(var i = 0; i < myLinks.length; i++) {        // parent = e.g. imported Page        // parent.parent = rectagle        // parent.parent.parentPage is a page or null        if (myLinks[i].parent.parent.parentPage != null) alert("I am on a page");        else alert("I am not on a page");    }
}

 

kind regards

 

Daniel (from Switzerland)


Viewing all articles
Browse latest Browse all 72601

Trending Articles



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