Highlighted

How to get current preview time with ExtendScript

New Here ,
Apr 22, 2020

Copy link to clipboard

Copied

Hi.

 

How to get current preview time with ExtendScript.

I want to get the current time of the preview like the expression "time," not time of the Current Time Indicator.

 

Thank you.

Adobe Community Professional
Correct answer by Mathias Moehl | Adobe Community Professional

An expression is evaluated at every frame and each time the expression is evaluated, the variable time gives you this point in time. There is no such thing for scripts, since they are not evaluated at each frame, but only once, when you execute them.

If you want to execute a script while a preview is playing, there is no way to know which frame is playing while the script is running (and if it is a long running script I am not even sure if playback pauses or not).

Topics

How to, Preview, Scripting

Views

478

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to get current preview time with ExtendScript

New Here ,
Apr 22, 2020

Copy link to clipboard

Copied

Hi.

 

How to get current preview time with ExtendScript.

I want to get the current time of the preview like the expression "time," not time of the Current Time Indicator.

 

Thank you.

Adobe Community Professional
Correct answer by Mathias Moehl | Adobe Community Professional

An expression is evaluated at every frame and each time the expression is evaluated, the variable time gives you this point in time. There is no such thing for scripts, since they are not evaluated at each frame, but only once, when you execute them.

If you want to execute a script while a preview is playing, there is no way to know which frame is playing while the script is running (and if it is a long running script I am not even sure if playback pauses or not).

Topics

How to, Preview, Scripting

Views

479

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Apr 22, 2020

Copy link to clipboard

Copied

Not quite sure what you mean by preview time, but if you're looking work area, then look at three 2 properties:

http://docs.aenhancers.com/items/compitem/#compitem-workareaduration

http://docs.aenhancers.com/items/compitem/#compitem-workareastart

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 22, 2020

Copy link to clipboard

Copied

An expression is evaluated at every frame and each time the expression is evaluated, the variable time gives you this point in time. There is no such thing for scripts, since they are not evaluated at each frame, but only once, when you execute them.

If you want to execute a script while a preview is playing, there is no way to know which frame is playing while the script is running (and if it is a long running script I am not even sure if playback pauses or not).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mylenium LATEST
Most Valuable Participant ,
Apr 22, 2020

Copy link to clipboard

Copied

Agree with Mathias. Your idea doesn't make much sense to begin with, given how this stuff works. If you want to execute scripts and be aware of specific timing, you have to give them something to latch on to like markers, keyframes or the layer in- and out-points.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...