Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

145
Vistas
passing parameter from javascript to c++ when both are running in the same time

I have a java script (cep panel) which works inside Adobe Premiere Pro.

When my UI button is clicked I'm able to read out the position of the time slider. At the moment I can despatch a js event with event.data yielding this position.

Concurrently, I have a separate .exe process with additional UI (myPlugin.exe). myPlugin.exe is to listen for this event, and I should feed this event.data into it. myPlugin.exe is written in c++.

What is the best way to make c++ catch this event and read out the position of the slider?

At the moment my javascript code looks like this: (snippet from .js file):

var insertButton = document.querySelector("#insert-button");
insertButton.addEventListener("click", openDocument);

var sliderEvent = new CSEvent("slider", "APPLICATION");

function openDocument(){
csInterface.evalScript('openDocument('+')', function(response) {
  sliderEvent.data = JSON.parse(response);
  new csInterface.dispatchEvent(sliderEvent);
  alert(sliderEvent.data); // this  sliderEvent.data should be passed into my c++ file 
}) 
}

and the .jsx script:

function openDocument(){
    var CTI_seconds = app.project.activeSequence.getPlayerPosition().seconds;// player position in seconds;
    return CTI_seconds;
}

May be I shoould use stdout in javascript instead of dispatch event? What is the best way to achieve the fasted transfer time?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda