Load Files into Stack in script without dialogs quietly
Hi!
I'm trying to use `Load Files into Stack` in my script, but it opens dialogs on every `loadLayers.intoStack` call.
It asks about units preferences, new layer name, renaming layer, duplicating layer, and renaming layer again, and units preferences once more. Every time I have to click `ok`.
Here is example of my code:
function main() {
var defaultFolder = new Folder("myFolderPath");
var inputFolder = defaultFolder.selectDlg("Select input folder", "", false);
if (inputFolder == null) return;
var filesList = inputFolder.getFiles("*.jpg");
var loadLayersFromScript = true;
var SCRIPTS_FOLDER = decodeURI(app.path + '/' + localize('$$$/ScriptingSupport/InstalledScripts=Presets/Scripts'));
$.evalFile( new File(SCRIPTS_FOLDER + '/Load Files into Stack.jsx'));
loadLayers.intoStack(filesList.slice(0,3), true);
}
main();
I’m looking for a way to suppress those dialogs, is there such one?
Thanks!
