I am starting a script to drop a PDF on an applet and replace an existing PDF link in an InDesign file by relinking (the same PDF appears in 6 different frames).
I can’t even get the droplet snippet below to work:
-- instruct if double clicked
on run
tell application "Finder"
display dialog "Please drop original trifold PDF onto droplet icon."
end tell
end run
-- process files dropped
on open theDroppedFile
tell application "Finder"
display dialog "Please select the trifold version." buttons {"A", "B"} default button 1
if button returned of result is "A" then
try
createTRI(theDroppedFile)
end try
else if button returned of result is "B" then
end if
end tell
end open
-- sub-routine opens the file
on createTRI(theDroppedFile)
tell application "Adobe InDesign CS3"
activate
open ":Volumes:Production1:_Templates:TRI Master A.indd" as alias
end tell
end createTRI
Where am I going wrong?