Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Issues with script pathways

New Here ,
Jul 07, 2015 Jul 07, 2015

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

TOPICS
Actions and scripting
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 07, 2015 Jul 07, 2015

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.

Translate
Adobe
Community Expert ,
Jul 07, 2015 Jul 07, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2015 Jul 07, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2015 Jul 07, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2015 Jul 07, 2015
LATEST

THANK YOU!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines