Thread View: adobe.scripting.indesign
1 messages
1 total messages
Started by loic_aigon
Fri, 30 Jan 2009 09:15
[JS CS3] Function relink working but nof fully functional
Author: loic_aigon
Date: Fri, 30 Jan 2009 09:15
Date: Fri, 30 Jan 2009 09:15
26 lines
1526 bytes
1526 bytes
Hi,
I wrote this function to update all my links as path were modified.
It runs well except that when I launch it, it let a few links not updated.
I need to relaunch and relaunch the script as long as necessary to get all links updated.
Is this a know issue ?
I run it as a loop call for any of my links
link is links[i]
name is the name of the broken link (ie : lostlink.tif)
newlink is the link to the new file (ie. /d/.../newlink.tif)
So for all links, it looks for the link status.
If it's not normal, it will check for the name of the link and look if it contains the name requested. In this case, it will relink the link to a new direction and update it.
function relinks(link, name, newlink)
{
if(link.name.indexOf(name)>=0 && link.name.indexOf("/m/")==-1)
{
link.relink(File(newlink));
link.update();
link.parent.fit(FitOptions.PROPORTIONALLY)
link.parent.fit(FitOptions.CENTER_CONTENT);
}
}
thanks for advice
Loic
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads