I need to group a few images into one photoshop file and try to look for a more optimized path. I know I can use applescript to do something like this.
tell application id "com.adobe.Photoshop"
activate
open file (CurrentImg)
duplicate layer 1 of current document to end of NewDocRef
end tell
-- CurrentImg is some file path and NewDocRef is a path to some other open document
I can use the open to open every image one at a time and move it into one document. My Question is, does anyone have some better way to place images directly into the open document. Looking for the effect of just dragging an image in. I am open to having a javascript function to do it. (I don’t know javascript but I can manage to mostly understand what I read.)
2
Answers
I wrote it in ExtendScript.
Tested on Osx Photoshop 2014 CC
I’ve been looking for the same thing. Opening all the files, selecting and copy-pasting the content is not a really good visual experience for the end-user.
Using the Photoshop Scriptlistener plugin, you can listen to actions and have them written out for you in javascript. You can then replay or modify them to your convenience.
This (except the first line) is what I’ve captured with the listener. It asks you for a file input and places it in the current open document. You can easily modify this to your situation using the code @fabiantheblind provided here.
You can paste this in extendscript toolkit and see that it works. I have it working in CC, haven’t tested it for cc2014