File Path issue

I’ve got a script that looks at a specified folder and determines which files are larger than 1mb (they are TIFF files). It then opens each file that is 1mb or greater in Photoshop and saves it with LZW compression.

I just upgraded from Photoshop CS3 to CC and the script stopped working. I get this error on the line

open myFilePath

:

error “Adobe Photoshop CC got an error: File some object wasn’t found.” number -43

I threw in the line

display dialog "FilePath: " & myFilePath

just for debugging so I could see what the file path was.

ex.: FilePath: Macintosh HD:Users:dsuser:Desktop:TestLZW:araujo:00000025.tif

on run
	tell application "Finder"
		set sourcePath to choose folder with prompt "Please select SOURCE folder:"
		set savePath to choose folder with prompt "Please select DESTINATION folder:"
		set fileList to (files of entire contents of sourcePath whose size > 1.0E+6) as alias list
	end tell
	repeat until fileList = {}
		set myFilePath to item 1 of fileList as alias
				
		tell application "Adobe Photoshop CC"
			display dialog "FilePath: " & myFilePath
			open myFilePath
			save document 1 in myFilePath as TIFF with options {class:TIFF save options, byte order:IBM PC, image compression:LZW} appending lowercase extension
			
			close document 1
		end tell
		
		set fileList to rest of fileList
	end repeat
end run

Try this:


tell application "Adobe Photoshop CC"
	open file (filePath as string) showing dialogs never
end tell

Model: MacBook Pro 2.7 GHz Core i7 16GB RAM
Browser: Safari 537.31
Operating System: Mac OS X (10.8)