Skip to main content
Participating Frequently
Jan 5, 2023 5:05 PM UTC
Open for Voting

WorkArea start point

Hello Friends,

my script shout shift the start point of the work area.

If the start point is smaller the current time it’s work fine,

but if it’s bigger the start point don’t fit and the duration also change to a bigger value. ???

I think its a bug.

var activeComp = app.project.activeItem;
activeComp.workAreaStart = 5;
activeComp.workAreaDuration = 2;

 

4 replies

22dorAuthor
Participating Frequently
Jan 5, 2023 6:54 PM UTC

...If I call the workAreaStart two times it work properly 😄

 

activeComp.workAreaStart = 5;

activeComp.workAreaStart = 5;
activeComp.workAreaDuration = 2; 

 

Translate
Dan Ebberts
Community Expert
Community Expert
Jan 5, 2023 6:50 PM UTC

Ah, OK. That's interesting. It's like you need to reset it first to avoid running into constraints:

 

var activeComp = app.project.activeItem;
activeComp.workAreaStart = 0;
activeComp.workAreaDuration = activeComp.duration;
activeComp.workAreaStart = 5;
activeComp.workAreaDuration = 2;

 

Translate
22dorAuthor
Participating Frequently
Jan 5, 2023 6:33 PM UTC

My Script should just shift the Work area. 

activeComp.workAreaStart = 5;
activeComp.workAreaDuration = 2; 
But dont work in case 2.

 

Translate
Dan Ebberts
Community Expert
Community Expert
Jan 5, 2023 5:25 PM UTC

The only thing I'm seeing is that trying to set a duration that extends past the end of the comp will generate an error, but I don't see any behavior that depends on where the CTI is located (is that what you meant)? Can you post a screenshot?

Translate