try this, the script opens the dropped files in PhotoShop
The files are saved in the same folder as the original files.
on open theFiles
repeat with aFile in theFiles
tell application "System Events"
set {name:fileName, name extension:fileExtension, container:fileContainer} to theFile
set containerPath to path of fileContainer
end tell
set TIFFpath to containerPath & text 1 thru ((get offset of "." & fileExtension in fileName) - 1) of fileName & ".tif"
tell application "Adobe Photoshop CS6"
open file (aFile as text)
tell current document
change mode to CMYK
resize image resolution 300.0 resample method none
end tell
save current document in TIFFpath as TIFF
close document 1
end tell
end repeat
end open
Thanks for the script, however, I want the application for CS5 not cs6. Secondly, while testing the script in CS6, I got an error “The variable theFile is not defined.”
Apart from this, the source files (images) could be of any type i.e. jpg, png, eps, etc. and most important the file may or may not contain extension. I’m on MAC OS X
Could you please send me the revised code for CS5.
sorry, I wrapped the code in the on open handler and forgot to replace theFile with aFile in the first System Events line.
The script is supposed to handle all file types however there is no error handling for file which Photoshop cannot open.
I don’t have CS 5 but I guess the script works on CS 5 as well
In addition to my previous request, I’m submitting you the actual Photoshop CS5 Action Droplet that is used to convert images to CMYK with 300 DPI and embedded with colour profile.