Copy link to clipboard
Copied
I use this code in my button:
var prj:Project = Premiere.app.project;
var arr:Array = new Array();
arr[0] = "c:\abc.mp4"
prj.importFiles(arr);
Premiere project add an item named "abc.mp4" but i want display this item with name like "somethingiwant.mp4".
and then i create bin by:
prj.rootItem.createBin("tempbin");
i want move the clip into this bin.
I can not do these, help me please !!
First: The current PPro release (8.1, or "PPro CC 2014.") is the last that will support Flex-based panels. I recommend moving to HTML5-based panels, as soon as possible.
Second: Instead of moving the footage item into the bin AFTER importing it, you can create and target the new bin BEFORE the import.
[Sample code is ExtendScript]
var newBin = app.project.rootItem.createBin("Bin for your stuff");
newBin.select(); // target new bin for next import
importFiles(...); // import files, as before
Copy link to clipboard
Copied
First: The current PPro release (8.1, or "PPro CC 2014.") is the last that will support Flex-based panels. I recommend moving to HTML5-based panels, as soon as possible.
Second: Instead of moving the footage item into the bin AFTER importing it, you can create and target the new bin BEFORE the import.
[Sample code is ExtendScript]
var newBin = app.project.rootItem.createBin("Bin for your stuff");
newBin.select(); // target new bin for next import
importFiles(...); // import files, as before
Copy link to clipboard
Copied
thanks bbb, i will move to html5 soon but with this version i need to fix for my customer.
So how about rename the Media item in premiere, I mean: instead of right click and choose rename, how can my software do that?
plz help
Copy link to clipboard
Copied
Here's the ExtendScript.
var item = app.project.rootItem.children[0];
if (item == null) {
alert("The first item in the project needs to be footage.")
} else {
item.name = "Whatever you want the new name to be"; }
Copy link to clipboard
Copied
thanks you very much for quick reply, i used the code for my premiere plugin, so i use actionscript 3 , not extendscript, any advise for this situation
Copy link to clipboard
Copied
My advice remains 'update to HTML5'.
Secondarily, ActionScript can call ExtendScript; search the web for 'CSXSInterface' and 'evalScript'
Copy link to clipboard
Copied
hi bbb_99,
Thanks for reply but at the moment we can not change to CC. So we still use CS6.
I tried Extendscript with CS6 but can not rename Clip with your command.
var item = app.project.rootItem.children[0];
if (item == null) {
alert("The first item in the project needs to be footage.")
} else {
item.name = "Whatever you want the new name to be"; }
Do you know how to change Clip metadata with extendscript? I want to change attribute "Name" instead of above.
Copy link to clipboard
Copied
CS6 didn't support renaming project items.