Skip to main content
zsaaro
Inspiring
July 24, 2022
Question

CEP: is there a way to listen to events in the app itself?

  • July 24, 2022
  • 2 replies
  • 1548 views

I know you can use CSInterface to listen to a few basic events such as "ApplicationActivate" and "

ThemeColorChanged":
const cs = new CSInterface();
cs.addEventListener(
    "com.adobe.csxs.events.ApplicationActivate",
    function () {
    }
);

 In After-Effects, are there any other events that can be used? I could not find a list of events anywhere online, and it seems like other apps like Pohotoshop can listen to some changes made in the document, and if not, how would you tackle this?

 

Thanks in advance.

Saar

This topic has been closed for replies.

2 replies

Mathias Moehl
Community Expert
Community Expert
July 25, 2022

Monitoring changes of the document is not possible, as far as I know. I think the Ae team is reluctant to add these kinds of features, since they invite extensions to do all kinds of potentially slow background processes, which could bring the performance of Ae down. In other words, these features would need to be used carefully and could create all kinds of issues.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
zsaaro
zsaaroAuthor
Inspiring
July 25, 2022

Thank you Mathias. That makes a lot of sense.

Community Expert
July 25, 2022

i'm not that fluent with the CEP API, but you can write a C plugin that would listen to events and leave flags in the javascript global scope which the CEP panel can read on idle. (or perhaps invoke the panel directly. i'm not sure if that's possible)

zsaaro
zsaaroAuthor
Inspiring
July 25, 2022

Thanks Shachar.

How familiar are you with the plugins API? How difficult would this be for someone who's only familiar with CEP and Extendscript?

Community Expert
July 25, 2022

well, as C API project go, this specific task is pretty simple. alas, setting up the dev env and getting the plugins to compile correctly for the first time on a new machine is usually a pain...

did you look into UXP instead of CEP? perhpas it offers this functionality directly?