What's new

Load files into Stack automated action

#1
Hello! This is my first post/question. I've been spending a couple days trying to work around this myself but haven't succeeded.

I've created a rather complex action within Photoshop (CC), and currently the only step in the action which requires manual input is the "Load files into Stack" script.

I'd like to use the "Load files into Stack" script but prevent all prompts/dialogues. I'd simply like to hard code a folder location (filled with png files) so that the action can continue uninterrupted.

This feels "simple" enough to do, but I'm simply too unfamiliar with Photoshop scripting to get it to work myself (and I'm under a bit of a time constraint).

Cheers!

edit: just for what it's worth, I've scoured the forums and stack overflow looking for an existing answer/solution without success.
 
Last edited:
#2
Got it figured out :)

JSX:
var folder = new Folder('~/MyFolder'); 
 
 
function runLoadStack(folderPath) { 
    var loadLayersFromScript = true; 
    // @include 'Load Files into Stack.jsx' 
    var fList = folder.getFiles('*.png') 
    var aFlag = true; 
    loadLayers.alignStack = function( stackDoc ) 
{ 
    selectAllLayers(stackDoc, 0); 
} 
    loadLayers.intoStack(fList, aFlag); 
} 
runLoadStack(folder)
 
#3
Hey, it sounds like you were in the same place in in now. I'm trying to recreate exactly what you're doing. I'm getting an error code saying "Load Layers: At least two files must be selected to create a stack." Did you get this as well? Can you help me out? Thanks!
 
#4
Hey, it sounds like you were in the same place in in now. I'm trying to recreate exactly what you're doing. I'm getting an error code saying "Load Layers: At least two files must be selected to create a stack." Did you get this as well? Can you help me out? Thanks!
Hey dthaxton, sorry for the delay, I've been out of town. If you're seeing this message, it's probably one of two things
  1. The folder you're pointing to in the script (var folder = new Folder('~/MyFolder');) is empty
  2. You're not actually pointing to a folder (don't forget to change "'~/MyFolder' to your desired folder location
 

Top