Skip to content

Instantly share code, notes, and snippets.

@justintaylor-dev
Created April 12, 2022 18:13
Show Gist options
  • Save justintaylor-dev/5d8616f9b65f09b07b23c268c465208f to your computer and use it in GitHub Desktop.
Save justintaylor-dev/5d8616f9b65f09b07b23c268c465208f to your computer and use it in GitHub Desktop.
extendscript-to-cep-event
// JS / CEP Extension
const csInterface = new CSInterface();
csInterface.addEventListener('myEvent', (evt) => {
// do stuff
});
// ExtendScript
var xLib = new ExternalObject("lib:\PlugPlugExternalObject");
if (xLib) {
var eventObj = new CSXSEvent();
eventObj.type = "myEvent";
eventObj.data = "customData";
eventObj.dispatch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment