Can't get even alert to work - Eclipse/Extension Builder3

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

User avatar
Chris_Kalmar
Posts: 12
Joined: Wed Dec 14, 2016 9:51 pm

Can't get even alert to work - Eclipse/Extension Builder3

Post by Chris_Kalmar »

Hi I'm trying to figure how to connect my html extension panel
with PS DOM and i'm desperate because I can't get even simple alert on button click.

I don't know if it's some bug or similar. I'm using generated initial test file from Eclipse/Extension Builder 3 environment.
I followed number of tutorials and even try to clone workable extension to see if it works but when i open it in Photoshop any of buttons are not clickable at all. :cry:

Do you guys have some specific workflow or using eclipse generated files are just not good for this type of work?

I don't understand why My Photoshop 2014. 00 can't connect or why some other panel extension working without prob. but when I put all the same files into my project buttons don't work at all?


Chris
User avatar
Chris_Kalmar
Posts: 12
Joined: Wed Dec 14, 2016 9:51 pm

Re: Can't get even alert to work - Eclipse/Extension Builder3

Post by Chris_Kalmar »

Today I tried to use Hallodom's boilerplate
https://github.com/hallodom/photoshop-extension-example

And I get same results. I can open the panel but buttons are dead again :idea:
I don't know what to do...


C
ApWizard
Posts: 9
Joined: Fri Dec 16, 2016 7:39 am

Re: Can't get even alert to work - Eclipse/Extension Builder3

Post by ApWizard »

Hello Chris, can you show us a little bit of your code?
How do you call your function?

This is how I do it:

/*** in the index.html ***\

Code: Select all

...
<head>
<script src="ext.js"></script>
</head>
...
<body>
<button onClick="myFunction_onExtJs();">
...
/*** in the ext.js ***\

Code: Select all

function myFunction_onExtJs(){
evalScript("functionOnJSX()");
}
/*** in the JSX ***\

Code: Select all

...
functionOnJSX= myJSXFunction;

function myJSXFunction{
alert("Hi, I'm Photoshop");
}

my method is overly complicated but it's the only way I could make it work.
I'm not able to get it to work with the $_myFunction(){} declaration.
skrippy
Posts: 14
Joined: Sun Nov 27, 2016 5:34 am
Location: EU

Re: Can't get even alert to work - Eclipse/Extension Builder3

Post by skrippy »

Maybe unrelated, but I had the same problem of an alert not even working in a simple script.

I got the feeling it was because I used some "unrecognized" code. One character can do it probably.
User avatar
Chris_Kalmar
Posts: 12
Joined: Wed Dec 14, 2016 9:51 pm

Re: Can't get even alert to work - Eclipse/Extension Builder3

Post by Chris_Kalmar »

Thanks for your quick answer.
I figure out what causing this issue. It's a bug within my version of PS or installation itself.
I just updated to 2015.00 and everything working OK, seams so far.

I needed to update manifest to

<HostList>
<Host Name="PHSP" Version="[16.0,16.9]" />
<Host Name="PHXS" Version="[16.0,16.9]" />
</HostList>

and some messing with regedit

regedit > HKEY_CURRENT_USER/Software/Adobe/CSXS.6 to
add the PlayerDebugMode as a String with value “1”
that will enable debugging.


Thx,
Chris