Skip to main content
ananth padmakarp64550037
Known Participant
August 7, 2018
Question

unable to access jsx file from java script in adobe photoshop

  • August 7, 2018
  • 3 replies
  • 1411 views

The following images depicts the  folder structure of adobe cep illustrator extension panel which i have designed.

and the problem is that i am able to use core.jsx file which is in jsx folder in adobe illustrator. Now as per the requirement i need to make this plugin able to work in Photoshop and changed the manifest file commands which support photoshop. Now i am unable to use the jsx functions and retrive the data needed. control not even entering to core.jsx file. I am unable to find what the problem is. And while debugging its prompting a message "Unexpected token E in JSON at position 0 ".

Could some one help me with this?

[Moved it  from Photoshop to Extensions / Add-ons Development by Moderator]

This topic has been closed for replies.

3 replies

Loic.Aigon
Legend
August 7, 2018

If all went fine when it was Illustrator only and then just fails because you open it to Photoshop, I would certainly check the jsx file.

An easy way is to run jsx file in ExtendScript ToolKit while Targeting Photoshop. If there is an execution error, you will quickly see.

ananth padmakarp64550037
Known Participant
August 7, 2018

could you please help me using this ExtendScript Tool Kit? i haven't used this before..

ananth padmakarp64550037
Known Participant
August 7, 2018

what files do you need to verify?

i Did all the ways to trace the error and finally unable to find it.

Loic.Aigon
Legend
August 7, 2018

It might be (hard to state without code) that Photoshop script engine evaluates code designed for illustrator (i.e. calling AI API such as app.activeDocument.artboards[0] ) — or the contrary — and fails to load, thus failing the data to be returned, thus leading to HTML/JS error.

Look at samples, they are designed to load and evaluate jsx files on a per app basis avoiding those kind of issues.

An easy way to debug is to comment all your jsx code once to see if problem still occurs and uncomment little by little until you find the problematic area of your code.

HTH

Loic