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

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

Community Beginner ,
Oct 06, 2023 Oct 06, 2023

Copy link to clipboard

Copied

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

Views

108

Translate

Translate

Report

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.

Votes

Translate

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

Copy link to clipboard

Copied

Untested, but try changing the following...

 

From:

 

var docName = decodeURI(activeDocument.name);

 

To:

 

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

 

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Output is still blank.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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