Droplet problem - InDesign

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?

Hi,

two possible problems

¢ theDroppedFile is a list of aliases

 open ":Volumes:Production1:_Templates:TRI Master A.indd" as alias

¢ HFS paths start with a volume name (“Production1:_Templates:TRI Master A.indd”) and never with “Volumes” and never ever with a colon, unlike POSIX paths,
which start with a slash as the root directory (“/Volumes/Production1/_Templates/TRI Master A.indd”) and “/Volumes” for volumes except the startup volume

PS: while developing scripts it’s recommended to comment out all try blocks, otherwise all error messages will be ignored

Thanks very much Stefan - you saved my bacon again.
I appreciate the tip about commenting out trys for error codes.