Hallo Hilse,
nachdem das mit den Ordneraktionen wirklich unzuverlässig war, habe ich jetzt ein Skript als Programm gespeichert, mit dem ich die einzelnen Derivate erzeugen kann. Code s.u.
Gruß
Alex
set Ordner to (choose folder with prompt „Wählen Sie einen Ursprungsordner“) as string
set Wohinhigh to choose folder with prompt „Wählen Sie einen Zielordner für die 300 dpi/CMYK Jpegs“
set Wohinlow to choose folder with prompt „Wählen Sie einen Zielordner für die 72 dpi/RGB Jpegs“
set destPathhigh to Wohinhigh as string
tell application „System Events“
set these_files to every file of folder Ordner
end tell
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files as alias)
tell application „Finder“ to set fileName to name of this_file
if (count of text items of fileName) is greater than 1 then
set AppleScript’s text item delimiters to „.“
– nimmt den „.“ als trenner des dateinamens
set fileName to text items 1 thru -2 of fileName
end if
set newFilePath to destPathhigh & fileName & „_300.jpg“
set this_info to info for this_file
if visible of this_info is true and alias of this_info is false then
tell application „Adobe Photoshop CS4“
launch
activate
try
open this_file showing dialogs never
end try
set meinBild to the current document
try
resize image meinBild resolution 300 resample method bicubic
end try
set myOptions to ¬
{class:JPEG save options, embed color profile:true, format options:stuck_out_tongue:rogressive, quality:12, scans:3} ¬
try
save current document in file newFilePath as JPEG with options ¬
myOptions appending no extension without copying
end try
close current document
end tell
end if
end repeat
set destPathlow to Wohinlow as string
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files as alias)
tell application „Finder“ to set fileName to name of this_file
if (count of text items of fileName) is greater than 1 then
set AppleScript’s text item delimiters to „.“
– nimmt den „.“ als trenner des dateinamens
set fileName to text items 1 thru -2 of fileName
end if
set newFilePath to destPathlow & fileName & „_72.jpg“
set this_info to info for this_file
if visible of this_info is true and alias of this_info is false then
tell application „Adobe Photoshop CS4“
launch
activate
try
open this_file showing dialogs never
end try
set meinBild to the current document
try
change mode meinBild to RGB
resize image meinBild resolution 72 resample method bicubic
end try
set myOptions to ¬
{class:JPEG save options, embed color profile:true, format options:stuck_out_tongue:rogressive, quality:12, scans:3} ¬
try
save current document in file newFilePath as JPEG with options ¬
myOptions appending no extension without copying
end try
close current document
end tell
end if
end repeat