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

Need help making a minor modification to a .jsx file please.

Community Beginner ,
Oct 06, 2023 Oct 06, 2023

Hi!

When running this script from an unsaved document it works perfectly, however it includes the .psd extension when run for a previously saved doc ie. docname.psd.txt which has no data.

 

I'm not a coder in any shape, form or fashion but it seems intuitive that having the script remove .psd before saving will fix this. I just don't know exactly what to put where in the code to do this. 

 

I attached the script as a text document for you to have a look.

 

Thank you so much for your help! 🙂

~Karen

 

 

 

 

TOPICS
Actions and scripting
218
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 Beginner , Oct 06, 2023 Oct 06, 2023

Update: Turns out it had nothing to do with the file name. All groupings have to be removed in order for the data to export.

I'll just leave it at that for now & take these extra steps.

Translate
Adobe
Community Expert ,
Oct 06, 2023 Oct 06, 2023

Untested, but try changing the following...

 

From:

 

var docName = decodeURI(activeDocument.name);

 

To:

 

var docName = decodeURI(activeDocument.name.replace(/\.[^\.]+$/, ''));

 

 

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 Beginner ,
Oct 06, 2023 Oct 06, 2023

Output is still blank.

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 Beginner ,
Oct 06, 2023 Oct 06, 2023
LATEST

Update: Turns out it had nothing to do with the file name. All groupings have to be removed in order for the data to export.

I'll just leave it at that for now & take these extra steps.

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