Hi,
I am working on a Indesign document. I need to change the filepaths to a windows environment.
I thought that it was easy… just changing the “:” to “/” but
who can help me??
tell application "Adobe InDesign CC"
set oldParam to check links at open of linking preferences
set check links at open of linking preferences to false
activate
if active book exists then
else
set GetParentPath to ((choose file with prompt "Kies een Indesignbook:" of type "IDb5.5"))
open GetParentPath
delay 1
end if
end tell
tell application "Adobe InDesign CC"
tell active book
set fileList to full name of book contents
end tell
repeat with aFile in fileList
set theDoc to open aFile
set myDocument to active document
tell myDocument
set listOfLinks to (every link of myDocument)
repeat with m from 1 to count listOfLinks
set thisLink to item m of listOfLinks
set ASTID to AppleScript's text item delimiters -- Store settings
set TempPath to file path of thisLink as string
set AppleScript's text item delimiters to ":" -- Everything splits at this character
set TempPathBits to text items of TempPath
repeat with i from 1 to count TempPathBits
set item i of TempPathBits to TempPathBits & "/"
end repeat
set linkPath to items 1 thru i of TempPathBits as string
set AppleScript's text item delimiters to "/" -- Everything splits at this character
set NewLinkPath to items 1 thru m of TempPath -- set new path
--relink thisLink to file NewLinkPath
log NewLinkPath
end repeat
close theDoc saving yes
end tell
end repeat
set check links at open of linking preferences to oldParam
end tell
end