I imagine you had a folder in the list?
This version should be more robust and yield a little more information. I’ve also fixed a bug where the last item in the list wasn’t displayed.
// quick script to yield tab-separated name, type, width, height, frame rate, and duration for every item in a project
{
var projectTimeDisplayType = app.project.timeDisplayType;
app.project.timeDisplayType = TimeDisplayType.TIMECODE;
var namesAndFrameSizes = "Name\tType\tWidth\tHeight\tFrame Rate\tDuration\n";
for (var i = 1; i <= app.project.numItems; i++) {
var asset = new Object;
asset.name = app.project.item(i).name;
asset.typeName = app.project.item(i).typeName;
asset.width = (isNaN(parseInt(app.project.item(i).width))) ? "-" : parseInt(app.project.item(i).width);
asset.height = (isNaN(parseInt(app.project.item(i).height))) ? "-" : parseInt(app.project.item(i).height);
asset.frameRate = (isNaN(parseFloat(app.project.item(i).frameDuration))) ? "-" : parseFloat(1/app.project.item(i).frameDuration).toFixed(2);
asset.durationTimeCode = (isNaN(asset.frameRate)) ? "-" : timeToCurrentFormat(app.project.item(i).duration, asset.frameRate, true);
namesAndFrameSizes += asset.name + "\t" + asset.typeName + "\t" + asset.width + "\t" + asset.height + "\t" + asset.frameRate + "\t" +asset.durationTimeCode + "\n";
}
app.project.timeDisplayType = projectTimeDisplayType;
alertScroll("Names and Frame Sizes", namesAndFrameSizes);
}
function alertScroll (title, input) // string, string/array
{
// if input is an array, convert it to a string
if (input instanceof Array)
input = input.join("\r");
var w = new Window("dialog", title);
var list = w.add("edittext", undefined, input, {multiline: true, scrolling: true});
// the list should not be bigger than the maximum possible height of the window
list.maximumSize.height = w.maximumSize.height - 100;
list.minimumSize.width = 600;
w.add("button", undefined, "Close", {name: "ok"});
w.show();
}
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn]