So, I’m a completely newbie on this applescript thing.
What I’m trying to archive with this script that runs in a automator-watched folder is:
If image(s) file(s) is added to this specific folder do this:
1. Create a new folder
2. Give the folder the same name as the new file
3. Move the file to the corresponding folder.
So far, the steps above I manages to archive, but:
The next step I want to be able to do is to open the moved file in Photoshop and run a photoshop action on it. I’ve tried “open this_file” but it doesn’t open it. Any ideas on how to solve this?
this is my script:
-------------
onrun{input,parameters}
tellapplication"Finder"
setmlisttoeveryfileoffolder"Macintosh HD:Users:matrik:Desktop:drop" whose (nameends with ".jpg" ornameends with ".jpeg" ornameends with ".png" ornameends with ".gif")
repeatwiththis_fileinmlist
setcur_exttoname extensionofthis_file
setnew_nametotext1 thru -((lengthofcur_ext) + 2) of (nameofthis_fileastext)
setnew_foldertomakenewfolderwith properties{name:new_name}atfolder"Macintosh HD:Users:matrik:Desktop:drop"
movethis_filetonew_folder
set this_file to this_file as alias
tell application "Adobe Photoshop CC 2014"
activate
open this_file <-- Is this what I'm doing wrong?
do action “cool effects" from “my effects"
end tell
endrepeat
endtell
returninput
endrun