on adding folder items to this_folder after receiving PhotoshopFiles
tell application "Finder"
set ptd to path to desktop as text
set ptdpp to ptd & "Photoshop Processing" as text
set ptdpif to ptd & "Processed Images Folder" as text
set ptdpsf to ptd & "Processed Stored Folder" as text
set fileToLog to (ptdpif) & ":Photoshop_Batch_Errors_Log.txt" as text
set PhotoshopFiles to files of folder ptdpp as alias list
say (count of PhotoshopFiles)
if not (exists file fileToLog) then
make new file at ptdpif with properties {name:"Photoshop_Batch_Errors_Log.txt"}
end if
end tell
tell application "Adobe Photoshop CS5"
activate
set display dialogs to never
batch "Wood Frame - 50 pixel" from "Default Actions" from files PhotoshopFiles with options {destination:folder, destination folder:alias ptdpif, error file:alias fileToLog, macintosh compatible:true, file naming:{document name mixed, extension lower}, suppress open:true, override save:true}
end tell
tell application "Finder"
move PhotoshopFiles to ptdpsf
end tell
end adding folder items to