I am having a tough time. Photoshop seems to be very slow when scripting it and I am not sure if someone knows of some short cuts that will help speed it up. All I am trying to do is open a file, run an action, save that file, and then rename the file. Here is the code that I am trying to process:
set thePath to (path to desktop as string) & "new script:test:"
set theFileList to list folder thePath without invisibles
repeat with i from 1 to count of theFileList
set thisFile to item i in theFileList
tell application "Adobe Photoshop CS2"
activate
tell application "Finder"
set thewholefile to thePath & thisFile as alias
copy {(name of thewholefile), (name extension of thewholefile)} to {the_name, the_extension}
if the_extension is not "" then set the_name to (text 1 thru ((length of the_name) - (length of the_extension) - 1) of the_name)
end tell
set ProofImage to thePath & the_name & "1." & the_extension
set thisFilePath to (thePath as string) & thisFile as alias
open thisFilePath
do action "Proofs" from "eMotion Actions"
set myOptions to {class:JPEG save options, format options:progressive, scans:3, quality:12}
save current document in file ProofImage as JPEG with options myOptions appending no extension with copying
close current document saving no
tell application "Finder"
set comment of (ProofImage as alias) to the_name as string
set name of file (ProofImage) to "1 - 0" & i & "." & the_extension
end tell
end tell
end repeat