Highlighted

extension communication paths

Contributor ,
May 24, 2020

Copy link to clipboard

Copied

Hi, I am trying to understand what is possible and what not.

a) an extedscript can send an event to a CEP panel. Can the panel return any data?

b) is there a way for an extendscript to detect when the active document changes? (AI specific, ID has app.addEventListener()

c) can a CEP panel talk to an extendscript panel? (It can have its own extendscript, but they do not seem to share variables)

 

Thanks for any pointers....

TOPICS
Scripting, SDK

Views

721

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

extension communication paths

Contributor ,
May 24, 2020

Copy link to clipboard

Copied

Hi, I am trying to understand what is possible and what not.

a) an extedscript can send an event to a CEP panel. Can the panel return any data?

b) is there a way for an extendscript to detect when the active document changes? (AI specific, ID has app.addEventListener()

c) can a CEP panel talk to an extendscript panel? (It can have its own extendscript, but they do not seem to share variables)

 

Thanks for any pointers....

TOPICS
Scripting, SDK

Views

722

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 24, 2020 0
Adobe Community Professional ,
May 26, 2020

Copy link to clipboard

Copied

You can call ExtendScritp from the CEP side with evalScript method in CSInterface class. And ExtendScript can dispatch events with messages using PlugPlugInterface.
Here is a concept project you can refer to.
https://github.com/ten-A/CreativeSuiteSDK_Experimentals/tree/master/net.sytes.chuwa.callbacktest 

 

If you want to support events, you need to make a plug-in similar below.

https://github.com/ten-A/EventAdapter 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2020 0
Contributor ,
May 26, 2020

Copy link to clipboard

Copied

Hi, and thanks.

 

I am already using the plugplug method. I have a html panel and two separate extendscript/scriptUI panels. The latter ones sends an event to the former, to inform it about things it changed. In fact a history of changes is collected. When the file is saved, the html panel responds to the save event and sends the collected info to a database. What I am still missing is a way for the extendscript panel to get a response from the html (e.g. number of events sent during the current session)

 

The eventadapter looks very useful, but I would have to convert a scriptUI panel into a html one in order to listen to these events?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2020 0