Copy link to clipboard
Copied
Hi all!
I should start by saying I have very little knowledge of scripting. I found a script from the interwebs that is meant to batch process images in photomerge. I was able to launch the script which references a second script in the Adobe's stock Stack Scripts Only folder (Photomerge.jsx). The error occurs on line 44 when it says the File or folder does not exist. Here is the code:
41 var g_StackScriptFolderPath = app.path + "/"+ localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts") + "/"
42 + localize("$$$/private/Exposuremerge/StackScriptOnly=Stack Scripts Only/");
43
44 $.evalFile(g_StackScriptFolderPath + "LatteUI.jsx");
45
46 $.evalFile(g_StackScriptFolderPath + "StackSupport.jsx");
47
48 $.evalFile(g_StackScriptFolderPath + "CreateImageStack.jsx");
49
50 $.evalFile(g_StackScriptFolderPath + "Geometry.jsx");
51
52 $.evalFile(g_StackScriptFolderPath + "PolyClip.jsx");
So I feel like I should need to alter stock scripts and if I do, it will open a whole can of worms. My question is, what am I doing incorrectly?
Here is the blog where I found the code for batch photomerge: Automating the Automation: Running Photomerge in batches in Adobe Photoshop | Cristi Cotovan
Thank you for any insight!!!!
Ani
Ye, but you need a quote for the path. You only have one at the end. You can still use app.path:
var newPath = app.path + '/Presets/Scripts/Stack Scripts Only/LatteUI.jsx'
You might run into other issue doing the $.evalFile with these, but that's how you should handle the paths.
Copy link to clipboard
Copied
The paths you have shown there are localized, which means that the names will translate into different languages based on what the computer language is set for. I would guess you don't have the file or part of the script that explains what the localization is. If this is just for your own use, I would change that to paths that are associated with your computer.
Copy link to clipboard
Copied
OK, I think I understand this. So should the code read, for example,
$.evalFile(/c/Program Files/Adobe/Adobe Photoshop CC 2015/Presets/Scripts/Stack Scripts Only/LatteUI")
to reference to absolute path for each script?
And remove the variable g_StackScriptFolderPath?
Thank you! I really really appreciate your response.
Copy link to clipboard
Copied
Ye, but you need a quote for the path. You only have one at the end. You can still use app.path:
var newPath = app.path + '/Presets/Scripts/Stack Scripts Only/LatteUI.jsx'
You might run into other issue doing the $.evalFile with these, but that's how you should handle the paths.
Copy link to clipboard
Copied
THANK YOU!!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more