🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19150

Trouble relinking

#19150
From: Dave Saunders
Date: Tue, 14 Jan 2003 02:09
21 lines
1368 bytes
I've solved the problem, but my solution seems very Heath Robinson. I ended up writing:

tell application "InDesign 2.0.2"
 set myLinks to every link of document 1
 set linkName to full name of document 1 & " Figures:CA-Fig3-2.tif"
 set it1 to page item 1 of page item 1 of item 1 of selection
 repeat with theLink in myLinks
  set it2 to parent of theLink
  if it1 = it2 then
   tell link theLink to relink to file linkName
 update theLink
   exit repeat
  end if
 end repeat
end tell

This works -- I've been banging my head for two hours to get this far. My problem has been that any attempt to directly get the link of page item 1 of page item 1 of item 1 of selection gave me an error.

What am I missing?

Dave
Technical Details
Message-ID: <1de75d81.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,f57e9cfba413414c,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-01-13 18:38:52 PST
From: "Dave Saunders" <daves@pdsassoc.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Trouble relinking
Message-ID: <1de75d81.-1@WebX.la2eafNXanI>
Date: Mon, 13 Jan 2003 18:09:14 -0800
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit