Photoshop Javascript Code Was Missing

153 views
Skip to first unread message

Prewitt Howells

unread,
Jul 21, 2024, 4:43:41 AM7/21/24
to ocaratloa

For the last couple of weeks, I have noticed that this popup has been appearing every time I close my photoshop. Sometimes when I open it, they tell me that my preset isn't synced or something, so I should restart it to sync it.
I thought nothing of it, but I think it might be linked to another bug.
I use File>Image processor>JPEG a lot for my work. Pretty much every other day, but suddenly I started receiving missing Javascript code error. I've attached the screenshot to the post as well. Is there any fix to it? I have been working around it by restarting my computer every time I need to use it, but it's really getting tedious. If there's a fix, I'd love to hear it out, so I don't have to keep restarting my computer for it. The same thing appears on every other "Scripts" option in Photoshop.

It looks like you downloaded the GitHub HTML page which shows the script code, rather than the actual script itself. Don't feel bad, you aren't the first one to do this! We've improved the instructions to make it more clear how to download the script:
spine-scripts/README.md at master EsotericSoftware/spine-scripts

photoshop javascript code was missing


Download File · https://blltly.com/2zv4Gu



I've also had a problem with the PS to spine script! its been working since I've had the program, and suddenly it stopped. Now its asking me to save a PSD for every layer, not a PNG. I resaved the script with the one you linked to above and I get the same error. Any ideas?

I would like to mention that it SEEMS to only be an issue when I try to run this script on PS files that are smart objects that open to Illustrator, not smart objects made in PS. I don't remember this ever being an issue, but is it a known workaround? I just made a second file, rasterized all of the layers, and i had to drag them into a new file to wipe any lingering AI issues.

I've emailed the PSD that gives me the error, the forum isnt letting me attach the file :/ But Im able to reliably produce the error when using smart objects that open up in Illustrator, but its fine with using smart objects that open in PS. Its something I will keep in mind with my current workflow and isn't a full blocker anymore ?

What google chrome does is if we right-click and "save link as," it downloads the Github HTML Page. What I did was I copied the code from GITHUB, opened the PhotoshoptoSpine.jsx file, deleted the code in it pasted the correct code. Now it works.

You don't need to log in, but from the first link, you should click on the master folder

Then a new green button will appear on the right to download everything:

You unzip that folder and navigate to the Photoshop folder, where you'll find the script (:

In an unfortunate turn of events, I've run into exactly the same error as a.meyer. Similar situation too. I've been working on something on and off for a few weeks. Today I went to run the script and it produced the error above. I updated Photoshop and Java, which had no effect. I even installed ExtendScript, and that's starting to look like a can of worms I can't afford to open tonight.

Note the old script had a checkbox to treat each group as a skin. The new script is much more powerful, but requires you to put [skin] in the name of the groups you want to be treated as a skin, eg "SAND_HUMAN_MALE [skin]". There are other very useful tags, like [merge], see here:
spine-scripts/photoshop at master EsotericSoftware/spine-scripts

Thank you both. For whatever reason, Nate, I didn't get that error. I'm sure I would have once the other one was sorted out. And Erikari, I've never touched tags before, but I've never had so many folders. Good to know!

I have created my own script to help me organize software.
I have it pull the serial number, name of software from a file using get-content.
I then export it to a CSV file, it all works fine. However I just want to clean up the formatting on it.
For example on the Software field, it populates software:Photoshop, I want the cell in the CSV file to only show Photoshop not the word software. The file its getting its content from is just a text file with two different lines. Look like this
Software: Photoshop
Serial: 111-111-111

It then exports it to a csv file that has 4 column headers, Serial, Software, PCName and Date. The information gets populated to the correct column. The issue is under software and serial, it does list the software and serial but in front of software name says software:photoshop. I want it to only record photoshop under software column.
This is my code. Any help would be appreciated.

If you could share a few sanitzed lines of your input files we mught be able to help a little further. This could make your code a little more robust and reliable.
If you share sample data please format this as code as well. Here you can read how that works: Guide to Posting Code.

I have used the trim function on the string and I still get the same results. Here is the interesting part when I use the code below when the script runs in ISE it displays correct as 111-111-1111 For serial number column and Photoshop for Software Column. on the exported CSV file it shows up incorrect.

Thank you for all your persistent help and patience. Unfortunately -Delimeter suggestion did not work either. However I was able to fix it. I declared another variable, that reads the original variable after it has gotten the context from the text file. I then use Trim to trim Serial Number word from it.

It does not work like you (still) think it does. Please read my answers about this topic again and try to understand the code I posted. If it would work like you think you could remove one single number from the end of a string with something like this:

Perhaps I made the corrections you suggested in the wrong spot. However, I wonder if you ran the code I sent and if you tried to recreate the problem to see if you got the same issues as me.
Either way, I want to thank you for educating me.
I have found a solution that works for me.

As you continue learning PowerShell, you should be aware that the ISE is not a reliable test environment. Development ended in 2017 along with Windows PowerShell v.5.1. If you are using an up-to-date Windows platform, you should actually be using PowerShell Core v.7 (to check this just echo $PSVersionTable).

Does Python offer support for image manipulation (nativly) or do I need to download a third-party module for that?
I was thinking that maybe some of the processing I want to do can be done directly by Python - before opening up the Photoshop application.

To run the script, you just append the script path to the photoshop path so X:\Adobe\Adobe Photoshop CC (64 Bit)\Photoshop.exe X:\Lolpathest.jsx. I used this method to talk back and forth from Max to Photoshop

[QUOTE=haiddasalami;23439]To run the script, you just append the script path to the photoshop path so X:\Adobe\Adobe Photoshop CC (64 Bit)\Photoshop.exe X:\Lolpathest.jsx. I used this method to talk back and forth from Max to Photoshop

So I thought that maybe subprocess is trying to execute the script before the workfile is open, so I opened up photoshop and the workfile and then ran the Python code:
Same problem. Running the script via Python triggers that weird error - running the script inside Photoshop manually works as a charm.

I guess this could easily be sorted out just by splitting that command and not try and run everything at once. Opening Photoshop and the workfile in one go is just fine - but the script has to be executed after the workfile has been -fully- loaded in Photoshop.

you could put the open call in the script. Actually, can you even pass arguments to the script or does it just run as-is? If not, just stick it in a while loop until app.activeDocument is not undefined.

This article presents scripts for not only saving a PDF file to disk, but also for saving the PDF to different formats, such as an image file, MS Word, text and even HTML. Being able to save a file to disk is a critical activity for Acrobat workflow automation, and fortunately, there are a couple ways to do this from an Acrobat script. In fact, this is a feature that has been around for a long time, so everything discussed here is valid for old versions of Acrobat as well as Acrobat XI.

Saving in Reader is a little different since this functionality was traditionally off limits, except for specially "Enabled" documents. As explained below, this restriction was mostly removed in version XI, making Reader a much more useful tool in Document Workflows.

Trust mechanisms are useful and appropriate in a small or closed environment, such as an office. They are not suitable for widely distributed files. In Acrobat, there are three main trust mechanisms; Actions (batch sequences), trusted functions and digital signatures. All three of these mechanisms provide a "Privileged Context" for code that requires trust. The first two are useful for workflow automation. The last one, digital signatures, is most useful for business documents, such as contracts that are passed back and forth between businesses or within an office. At least one of these trust mechanisms must be employed in order for a script to be able to silently save a PDF to disk.

There used to be a saying in the Acrobat/PDF community, "Reader is a reader, not a writer." The original versions of Reader did not have "Save" capabilities, the idea being that it was a free tool only used for reading (hence the name). Writing a PDF required purchasing Acrobat. Despite these sage-like words of wisdom, Adobe did provide a method for saving PDFs from Reader, called "Reader Rights Enabling (or extensions)." A Reader Right is a kind of special sauce that when applied to a PDF, allowed that PDF to be modified and saved in Reader. There are different types of Rights for different types of features, such as forms, markup, and signing. Both Form and Markup Rights became obsolete in Acrobat XI. Anyone can now fill out a form or add markup annotations to a PDF in Reader XI and then save the file. Other modifications, such as digitally signing a PDF, still require the addition of a Right to the PDF. Since anyone with Reader XI can now save filled forms and marked up PDFs, a script can also save a PDF in Reader XI without any special sauce added to that PDF.

e59dfda104
Reply all
Reply to author
Forward
0 new messages