Skip to main content
karendenning
Inspiring
October 7, 2023
Answered

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

  • October 7, 2023
  • 3 replies
  • 230 views

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

 

 

 

 

This topic has been closed for replies.
Correct answer karendenning

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.

3 replies

karendenning
karendenningAuthorCorrect answer
Inspiring
October 7, 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.

Stephen Marsh
Community Expert
Community Expert
October 7, 2023

Untested, but try changing the following...

 

From:

 

var docName = decodeURI(activeDocument.name);

 

To:

 

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

 

 

karendenning
Inspiring
October 7, 2023

Output is still blank.