Open a dokument in Photoshop with applescript

I had a small scipt that use work Ok, but when I tried to use it some days ago it didn’t.

When I opened it and tried to modify it applescript complained that PDF didn’t have any “class”.

tell application “Adobe Photoshop CS2”
activate
set myFilePath to “XXXXXXXXX.pdf”
open myFilePath as PDF with options {class:PDF open options, mode:RGB, resolution:72, constrain proportions:true}

end tell

Something must have changed since I wrote it. Grateful for your assistance

AppleScript: 2.3
Browser: Safari 534.57.2
Operating System: Mac OS X (10.6)

Hello and welcome to the forum

I don’t have CS2 installed anymore so cant test, the code supplied works fine for me using CS6
see how it goes for you.

tell application "Adobe Photoshop CS6"
	set theImage to "/Users/Boboslakke/Desktop/TEST.pdf" --Set file path as this
	with timeout of 300 seconds
		open alias theImage as PDF with options {class:PDF open options, mode:RGB, resolution:72, constrain proportions:true}
	end timeout
end tell