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: xbytor, DavideBarranca, Paul MR

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

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

Postby Chris_Kalmar » Wed Dec 14, 2016 10:25 pm

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


Hit run and get some fun!

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

Postby Chris_Kalmar » Thu Dec 15, 2016 9:14 am

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
Hit run and get some fun!

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

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

Postby ApWizard » Fri Dec 16, 2016 7:49 am

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: 9
Joined: Sun Nov 27, 2016 5:34 am
Location: EU

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

Postby skrippy » Fri Dec 16, 2016 5:54 pm

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

Postby Chris_Kalmar » Fri Dec 16, 2016 10:27 pm

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
Hit run and get some fun!


Return to “Help Me”

Who is online

Users browsing this forum: No registered users and 3 guests