Skip to main content
Inspiring
May 24, 2020
Question

extension communication paths

  • May 24, 2020
  • 1 reply
  • 1040 views

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....

This topic has been closed for replies.

1 reply

Ten A
Community Expert
Community Expert
May 26, 2020

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 

Inspiring
May 26, 2020

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?