Copy link to clipboard
Copied
Does anyone know the specific event to listen for when new comment markers are added to the active sequence?
For example...
csInterface.addEventListener("com.adobe.csxs.events.newMarkerCreated", function(event){
//...
});
Moreover, is there any documentation on all the events we can listen for when adding event listeners in Premiere Pro? I've searched the sample code and CEP documentation and found a few so far... but was wondering if there were more.
3 Correct answers
> Does anyone know the specific event to listen for when new comment markers are added to the active sequence?
There is no such message. You're right, there is no "messages" documentation; we'll exercise a couple more of these, in the next release of PProPanel.
- onSourceClipSelectedInProjectPanel
- onSequenceActivated
- onActiveSequenceChanged
- onActiveSequenceSelectionChanged
- onActiveSequenceTrackItemAdded
- onActiveSequenceTrackItemRemoved
- onActiveSequenceStructureChanged
- onProjectChanged
To be notified of changes to the active sequence, register for onActiveSequenceStructureChanged messages, not onSequenceActivated.
> The event 'onSequenceActivated' can only interact with the elements in the jsx script
I'm not sure what distinction you're making; ExtendScript interacts with ExtendScript.
If you'd like to send a message from ExtendScript to your panel's JavaScript layer, use CSXS messages, as demostrated in PProPanel; search for "com.adobe.csxs.events.PProPanelRenderEvent".
OMG! I got it. Thank you very much Bruce, without you I would still be blind.
So for everyone else same as me (not the sharpest pencil in the box):
HTML <script> (JS) part:
var csInterface = new CSInterface();
csInterface.addEventListener('com.adobe.csxs.events.myActiveSequenceSelectionChanged', function(event) {
// alert("gogo");
document.getElementById('seq_name').innerHTML = event.data;
and Extend script:
1) you need 2 files in your jsx folder: JavaScript.d.ts and PlugPlugExternalObject
Copy link to clipboard
Copied
> Does anyone know the specific event to listen for when new comment markers are added to the active sequence?
There is no such message. You're right, there is no "messages" documentation; we'll exercise a couple more of these, in the next release of PProPanel.
- onSourceClipSelectedInProjectPanel
- onSequenceActivated
- onActiveSequenceChanged
- onActiveSequenceSelectionChanged
- onActiveSequenceTrackItemAdded
- onActiveSequenceTrackItemRemoved
- onActiveSequenceStructureChanged
- onProjectChanged
- onProjectEndDrop
- onEncoderJobCanceled
- onEncoderJobQueued
- onEncoderJobComplete
- onEncoderJobError
- onEncoderJobProgress
- onEncoderLaunched
Copy link to clipboard
Copied
Hey Bruce! Can you give me a brief example of how I could set up an event listener in CEP for onActiveSequenceChanged?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello Bruce,
How can we listen for the sequence change and pass the active sequence name in our CEP Panel without polling? The event 'onSequenceActivated' can only interact with the elements in the jsx script. I want to make it so it will return the sequence name once the event is triggered and pass it to my javascript so that my CEP Panel will automatically change 'tabs' depends on the sequence name.
I tried binding the event in the app (just like in PProPanel) and return the sequence name instead of updating the event panel. The problem is the evalscript only ran one time so I can't do what I want except if I use polling.
Copy link to clipboard
Copied
To be notified of changes to the active sequence, register for onActiveSequenceStructureChanged messages, not onSequenceActivated.
> The event 'onSequenceActivated' can only interact with the elements in the jsx script
I'm not sure what distinction you're making; ExtendScript interacts with ExtendScript.
If you'd like to send a message from ExtendScript to your panel's JavaScript layer, use CSXS messages, as demostrated in PProPanel; search for "com.adobe.csxs.events.PProPanelRenderEvent".
Copy link to clipboard
Copied
Hello Bruce,
may I ask how exactly? Because code:
csInterface.addEventListener('com.adobe.csxs.events.WorkspaceChanged', function(event) {
alert("gogo");
document.getElementById('seq_name').innerHTML = "goggo";
});
is not working. Nieder :
csInterface.addEventListener('com.adobe.csxs.events.WorkspaceChanged', function(event) {
alert("gogo");
document.getElementById('seq_name').innerHTML = "goggo";
csInterface.evalScript('$.runScript.registerSequenceSelectionChangedFxn()', function(result) {
document.getElementById('seq_name').innerHTML = result;
});
});
Copy link to clipboard
Copied
Works here; why would you only register your sequence changed function, after someone changes the workspace?
Copy link to clipboard
Copied
Well, my goal is to trigger the "onActiveSequenceSelectionChanged " event and if something in the premiere pro is changed (selection, clip is moved) the alert, or message appears in the CEP panel. I followed beforementioned posts but without success.
Maybe My understanding of the problem is lame - if so - sorry about that, but I didn't fully understand the relationship between CSXS messages and app.bind events. May I ask you for a little push on the issue I am trying to solve?
registerSequenceSelectionChangedFxn : function () { var success = app.bind('onActiveSequenceSelectionChanged', $.runScript.myActiveSequenceSelectionChangedFxn); }
Copy link to clipboard
Copied
> May I ask you for a little push on the issue I am trying to solve?
Sure!
First step: Set a breakpoint here in PProPanel, and confirm that you hit this function when changing the sequence selection?
Copy link to clipboard
Copied
Confirmed,
The extend script part is functional and it gives me the event in the event panel in premiere pro trough the function:
updateEventAPI: function (string){
app.setSDKEventMessage(string,"info")
},
Copy link to clipboard
Copied
Cool, now replace that info event, with your awesome code. 🙂
Copy link to clipboard
Copied
Well, first thing first - I think it is your awesome code if you did ppropanel - thank you for that. I am only a humble struggling scripter.
And second - Replacing code -
Em you mean -
myActiveSequenceSelectionChangedFxn : function () {
a = "jedu";
$.runScript.updateEventAPI(a);
// return a;
},
This one ... for what exactly? Something with "com.adobe.csxs.events.WorkspaceChanged" ? Or In html(JS) part
something like:
var csInterface = new CSInterface();
csInterface.addEventListener('com.adobe.csxs.events.WorkspaceChanged', function(event) {
alert("gogo");
document.getElementById('seq_name').innerHTML = "goggo"; csInterface.evalScript('$.runScript.registerSequenceSelectionChangedFxn()', function(result) {
document.getElementById('seq_name').innerHTML = result;
});
});
Because on that part i am strugling for 2 days.
Copy link to clipboard
Copied
Above, you're registering for a message about changes to the PPro workspace in use.
In your writing, you talk about wanting to respond when the sequence selection changes.
PProPanel successfully responds to sequence selection changes. Beyond that, you'd like to get a message from your ExtendScript, to your JavaScript, right?
To do so, your ExtendScript would post a custom CSXS event (instead of com.adobe.csxs.events.WorkspaceChanged, com.whatever.message.name.you.like...), and register a listener for that message, in your JavaScript.
Search PProPanel for 'com.adobe.csxs.events.PProPanelRenderEvent'.
Copy link to clipboard
Copied
OMG! I got it. Thank you very much Bruce, without you I would still be blind.
So for everyone else same as me (not the sharpest pencil in the box):
HTML <script> (JS) part:
var csInterface = new CSInterface();
csInterface.addEventListener('com.adobe.csxs.events.myActiveSequenceSelectionChanged', function(event) {
// alert("gogo");
document.getElementById('seq_name').innerHTML = event.data;
and Extend script:
1) you need 2 files in your jsx folder: JavaScript.d.ts and PlugPlugExternalObject.d.ts
2) you need all of this code - which means the register of custom CSXS event:
var eoName = "";
if (Folder.fs === 'Macintosh') {
eoName = "PlugPlugExternalObject";
} else {
eoName = "PlugPlugExternalObject.dll";
}
var plugplugLibrary = new ExternalObject( "lib:" + eoName );
if (plugplugLibrary){
var eventObj = new CSXSEvent();
eventObj.type = "com.adobe.csxs.events.myActiveSequenceSelectionChanged";
eventObj.data = "funguju macejko";
eventObj.dispatch();
};
then and after then only, the mission is completed 🙂
Copy link to clipboard
Copied
Bummer. We would've really liked to change the color of a marker, depending on a keyword detected in the name field.
Either way, thanks for your quick response, Bruce. And for this shortlist of messages in Premiere.
Copy link to clipboard
Copied
Well, it wouldn't be automatic, but a "update marker colors based on keywords" button would still work. 🙂
Copy link to clipboard
Copied
Indeed! We build the logic for it and have a button in our panel to run the script.
We were just hoping to leverage events so the colors could change on the fly, without user interaction.

