Skip to main content
Inspiring
December 29, 2021
Answered

asynchronous reading of the time slider position in PPRO

  • December 29, 2021
  • 1 reply
  • 718 views

Dear ppro fellows,

I need to read out time slider position in a CEP panel every 50-100 milliseconds. This process should run in the background.

From what I collected  from the internet, I should add to my .jsx script function the following line:

 

setInterval(function() {
var CTI_ticks1 = app.project.activeSequence.getPlayerPosition().ticks;
alert(CTI_ticks1.toString());
}, 1000);

The thing doesn't work. Never produces alerts.

If a simply put:

var CTI_ticks1 = app.project.activeSequence.getPlayerPosition().ticks;
alert(CTI_ticks1.toString());

 the script works allright and the alerts are seen.

Could you recomment some solution on this?

 

 

 

This topic has been closed for replies.
Correct answer Bruce Bullis

We are, but yes, I think I can help...

 

I need to read out time slider position in a CEP panel every 50-100 milliseconds.

 

Jaroslav, why do you think you need to do that?

 

setInterval() is a JavaScript construct, not present in ExtendScript.

Also, the polling behavior you've described is guaranteed to produce TERRIBLE performance. 🙂 

Describe the entire workflow you'd like to support (from the user's perspective), and we can discuss better solutions.

1 reply

Joost van der Hoeven
Community Expert
Community Expert
December 30, 2021
Ann Bens
Community Expert
Community Expert
December 30, 2021

I think they are still on leave.

Bruce Bullis
Bruce BullisCorrect answer
Legend
December 30, 2021

We are, but yes, I think I can help...

 

I need to read out time slider position in a CEP panel every 50-100 milliseconds.

 

Jaroslav, why do you think you need to do that?

 

setInterval() is a JavaScript construct, not present in ExtendScript.

Also, the polling behavior you've described is guaranteed to produce TERRIBLE performance. 🙂 

Describe the entire workflow you'd like to support (from the user's perspective), and we can discuss better solutions.