🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1554

Re: Update link - js assistance

#1554
From: Kasyan_Servetsky
Date: Fri, 30 Jan 2009 13:24
17 lines
1039 bytes
Hi Rasmus,

When you update links, iterate backwards, because updating a link changes links collection.

Kasyan


 
function UpdateAllOutdatedLinks(){
   var myLinks = myDocument.links;
   for(var myCounter = myDocument.links.length-1; myCounter >= 0; myCounter--){
      var myLink = myDocument.links[myCounter];
      if (myLink.status == LinkStatus.linkOutOfDate){
         myLink.update();
      }
   }
}
Technical Details
Message-ID: <59b7bbb3.1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b7bbb3.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,91cecb121be77b84
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Kasyan_Servetsky@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Update link - js assistance
Message-ID: <59b7bbb3.1@webcrossing.la2eafNXanI>
Date: Fri, 30 Jan 2009 05:24:58 -0800
References: <59b7bbb3.-1@webcrossing.la2eafNXanI>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit