Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!