Skip to main content
Participating Frequently
January 5, 2023

WorkArea start point

  • January 5, 2023
  • 4 replies
  • 295 views

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
January 5, 2023

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

 

activeComp.workAreaStart = 5;

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

 

Dan Ebberts
Community Expert
Community Expert
January 5, 2023

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;

 

22dorAuthor
Participating Frequently
January 5, 2023

My Script should just shift the Work area. 

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

 

Dan Ebberts
Community Expert
Community Expert
January 5, 2023

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?