Ik ben bezig met het maken van een hotfolder om daar foto's in te gooien en dan een output van 420px in een andere map.
Ik heb een map aangemaakt en die heet "Hotfolder, Verklein naar 420px" en in die map staat een map die heet "420px"
In Photoshop heb ik al een handeling aangemaakt.
In Automator heb ik bij nieuw gekozen voor "Mapactie" en vervolgens de juiste map geselecteerd.
Dan heb ik een Applescript geplaatst in Automator.
Maar ik krijg het helaas niet aan de gang
Ik zie even niet wat ik fout doet.
De Applescript:
on run {input, parameters}
tell application "Adobe Photoshop 2024"
activate
repeat with imagePath in input
open imagePath as alias
do action "Verklein naar 420px" of "420px"
set outputFolderPath to ((characters 1 through ((offset of "Hotfolder, Verklein naar 420px" in (imagePath as text)) + length of "Hotfolder, Verklein naar 420px") of (imagePath as text)) as string) & ":420px:"
set outputFile to (outputFolderPath & (name of (info for imagePath))) as string
save the front document in file outputFile as JPEG with options {quality: 10, formatOptions: Standard}
close the front document without saving
end repeat
end tell
return input
end run
Hotfolder met Automator+Applescript