Q: Applescript/Photoshop save JPEG dialog hangs open
re: OS 10.8.2 / Photoshop CS5.1
I have searched this issue but have not found a resolution. Every post I've found presents
"save current document in file filePath as JPEG with options myOptions"
as sufficient. When I try it, the dialog just hangs open:
This snippet works fine with TIFFs and PDFs:
tell application "Finder" to set filePath to (home as string) & "Desktop:TestFolder:Test.TIFF"
set thePosix to quoted form of POSIX path of filePath
tell application "Adobe Photoshop CS5.1"
set fileOptions to {class:TIFF save options, image compression:none, byte order:Mac OS, save alpha channels:true, save spot colors:true, embed color profile:true}
save current document in file filePath as TIFF with options fileOptions
end tell
But when I try to save a JPEG this way, the Save dialog opens with the correct options, but it just stays open. I even tried to exit through the GUI (commented out) but the script is clearly waiting for the save to complete - the GUI commands never execute.
tell application "Finder" to set filePath to (home as string) & "Desktop:TestFolder:Test.JPEG"
set thePosix to quoted form of POSIX path of filePath
tell application "Adobe Photoshop CS5.1"
set fileOptions to {class:JPEG save options, quality:8, embed color profile:true}
save current document in file filePath as JPEG with options fileOptions
(*
delay 1
tell application "System Events"
tell process "Photoshop"
keystroke return
delay 1
keystroke return
end tell
end tell
*)
end tell
This doesn't happen with a TIFF or a PDF. How do I exit the dialog?
Thanks for your help.
MacBook Pro, OS X Mountain Lion (10.8.2)
Posted on Apr 15, 2013 11:37 AM