Saving in Photoshop CS6

I’ve been trying to get a script to work with PS CS6 and keep running into an error:
error "Adobe Photoshop CS6 got an error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.

  • " number 8800
on run
	with timeout of 36000 seconds
		tell application "Finder"
			set sourcePath to choose folder with prompt "Please select SOURCE folder:"
			tell application "Finder" to set fileList to (files of entire contents of sourcePath whose size > 1.0E+6 and name ends with ".tif") as alias list
			
			repeat with aFile in fileList
				
				tell application "Adobe Photoshop CS6"
					
					open file (aFile as string)
					set myOptions to {class:TIFF save options, byte order:IBM PC, image compression:LZW}
					save current document in aFile as TIFF with options myOptions appending lowercase extension with copying
					close current document
					
				end tell
			end repeat
		end tell
	end timeout
end run

I think it centered around this line:

save current document in aFile as TIFF with options myOptions appending lowercase extension with copying

I have tried taking out the part

with options myOptions appending lowercase extension with copying

and a file opens and the Save As dialog comes up in PS, so I think it has something to do with adding in the options.

I have looked over the PS CS6 Applescript Scripting Reference document and think I’ve got the syntax right, but it just won’t work.

Any ideas?

This works for me (OS X 10.9.4):


on run
	with timeout of 36000 seconds
		--tell application "Finder"
		set sourcePath to choose folder with prompt "Please select SOURCE folder:"
		tell application "Finder" to set fileList to (files of entire contents of sourcePath whose size > 1 and name ends with ".tif") as alias list
		repeat with aFile in fileList
			
			tell application "Adobe Photoshop CS6"
				open file (aFile as string)
				set myOptions to {class:TIFF save options, byte order:IBM PC, image compression:LZW}
				save current document as TIFF in (aFile as string) with options myOptions appending lowercase extension with replacing
				close current document
				
			end tell
		end repeat

	end timeout
end run

Thank you so much! It works great for me now.