I am working in PS 7.0, converting PDFs to JPEGS and occasionally I will open a file which PS has problems reading for a variety of reasons (font is missing, etc. etc.) When this happens PS launches a dialog box usaully explaining the problem and giving you options to continue on with the task or to cancel.
Is there a way using AppleScript to detect when a situation like this occurs and then to close the dialog box and continue on with the script?
What happens with my script is it times out and displays a “Apple Event Timed Out” error message.
Can you post your script? What about just using PS’s “Batch” command? Using that you can suppress errors so that they are written to a log file but don’t interrupt the process.
if fileType = "PDF " then
set moveFileContents to true
try
–converting file to jpeg
tell application “Adobe Photoshop 7.0”
activate
with timeout of 30 seconds
open thisFilePath showing dialogs never
end timeout
set myOptions to {class:JPEG save options, embed color profile:false, format options:standard, matte:background color matte, quality:10}
save current document in thisFilePath as JPEG with options myOptions appending lowercase extension with copying
close current document saving no
end tell
on error errMsg number errNum
display dialog “There was an error with” & thisFile & return & return & “::::::::::::::::::::::::::::::::::::::” & return & ¬
“Error Number:” & errNum & return & "Error: " & errMsg & return & return & “::::::::::::::::::::::::::::::::::::::” giving up after 5
end try
end if --checking for pdf