I´m writing a script, that is able to open PDF and Illustrator Files in Photoshop to save them to another location. But I have Problems with zhe dialog that is shown, when a PDF or generic EPS is opened in Photoshop. The option “never show dialog” doesn´t work, so I don´t know what to do. Here´s the code:
on run
set TheFolder to choose folder with prompt “Folder?:”
tell application “Finder”
set TheFile to first file of folder TheFolder
set fileType to file type of TheFile
if fileType is “EPSF” or fileType is "PDF " then
open TheFile using application file id “8BIM”
else
open TheFile using application file id “8BIM”
end if
end tell
tell application “Adobe Photoshop 7.0”
— photoshop action
end tell
end run
The reason the “never show dialog” is not working is because you are using Finder to open the image instead of PhotoShop scripting.
You would need to tell PhotoShop to open the image:
tell application "Adobe Photoshop 7.0"
never show dialog
open TheFile
do photoshop action
end tell
Also there are some class options for EPS in the Photoshop Dictionary:
Class EPS open options: Settings related to opening a generic EPS document
Properties:
constrain proportions boolean -- constrain proportions of image
height real -- height of image (unit value)
mode grayscale/RGB/CMYK/Lab -- the document mode
resolution real -- the resolution of the document (in pixels per inch)
use antialias boolean -- use antialias?
width real -- width of image (unit value)
Using the Class option and Open theFile as EPS with mode CMYK is what may help avoiding the dialogs. I haven’t tested this.
Edited:
I did try this -
tell application "Adobe Photoshop 7.0" to open TheFile as EPS with options {class:EPS open options, mode:RGB}
You will probably need a work around for embedded profiles that will mismatch in your current working space.