Indesign CS to Phtoshop CS does not work under CS2

Hi all,

I am not the great programmer, but I got (by googleing and experimenting) the following script to work under CS. It goes from Indesign to Photoshop to process an image. It helped me a lot in my daily work. To my great sorrow it does not work with CS2 any more. It seems that Photoshop has problems with finding the file.

tell application "InDesign CS"
	set theSelection to item 1 of selection
	set theClass to class of theSelection
	if theClass is in {image, PDF} then
		-- if the image is selected by direct tools 
		set theSelection to parent of theSelection
	end if
	-- try to get the file path of the item: 
	set theFilePathOfImage to file path of item link of graphic 1 of theSelection
end tell

tell application "Adobe Photoshop CS"
	open (contents of theFilePathOfImage)
	do action "Graustufen" from "Meine"
	save document 1
	close document 1
end tell

Is there somebody who can give me a hint. Any help would be highly appreciated.

Thanks in advance


What happens if you change your Photoshop open command from this:

open (contents of theFilePathOfImage)

to this:

open file theFilePathOfImage



Great. Many thanks. It works.