Copy link to clipboard
Copied
Hi everyone. I want to change some clips' end time in my timeline via scripting.
This is my code:
var proj = app.project;
var srcSeq = proj.activeSequence;
var time = new Time();
time.seconds = 10;
var vClip = srcSeq.videoTracks[0].clips[0];
var aClip = srcSeq.audioTracks[0].clips[0];
vClip.end = time;
aClip.end = time;
The problem is when I execute my code, it always gives me error saying that 'cannot set property end'(last two lines giving the error).
However, it actually does change my clip end time.
This happens when I set the inPoint/outPoint/start/end time on my track clip.
Am I doing somthing wrong? Or it's a bug?
Hope I can get some help.
BTW, I am on Windows 10, Premiere Pro 14.6.0(should be the latest at the current time). And I script in vscode with ExtendScript Debugger extension.
The error you're seeing, is the bug. 🙂
We're tracking the issue as DVAPR-4224243.
Yes, this one is New World only.
It's unlikely that we'll add any new APIs to Old World; I'd also anticipate very few additions to the ExtendScript API, between now and when UXP support becomes available (no dates available).
Copy link to clipboard
Copied
The error you're seeing, is the bug. 🙂
We're tracking the issue as DVAPR-4224243.
Copy link to clipboard
Copied
Great thanks, Bruce! And another small issue of NewWorld scripting is that it complains every time the value passed into 'Alert()' is not a string. Can we have how it behaves like in the OldWorld scripting(not complaining when getting a non-string value) in the future?
Copy link to clipboard
Copied
No, because implicit type conversion to string went away, with the move to New World. It's unlikely to make a return.
Copy link to clipboard
Copied
Thanks! And another question: Are some api methods NewWorld Scripting only? This method
Copy link to clipboard
Copied
Yes, this one is New World only.
It's unlikely that we'll add any new APIs to Old World; I'd also anticipate very few additions to the ExtendScript API, between now and when UXP support becomes available (no dates available).
Copy link to clipboard
Copied
Thanks, Bruce! Super helpful. Looking forward to UXP stuff.
Copy link to clipboard
Copied
Any Update/Workaround for DVAPR-4224243?