making multiple movies
Posted by Jeff Spector on Nov 19, 2007; 9:53pm
URL: http://imagej.273.s1.nabble.com/Using-API-to-create-mask-with-multiple-rectangles-tp3697968p3697972.html
I"m still trying to get a macro that will read a list of directories
within a directory, then make /avi's out of the file sin each sub dir.
I thought what I did would work, but is doesn't, can someone please
help. Here is what I have to open each dir as an image sequence.
***********
macro "multi movie maker38"{
dir = getDirectory("Choose a Directory"); //the top level dir
list1 = getFileList(dir) ; //list of each dir
stack = 0 ;
setBatchMode(true);
for ( i = 0 ; i < list1.length; i++) {
if (endsWith(list1[i], "/")) {
list2 = getFileList("" + dir + list1[i]); //list of the files
in the current dir
print(dir+list1[i]+list2[0]); // this works fine
print(" ");
run("Image Sequence...", "open=dir+list1[i]+list2[0]
number=list2.length increment=1 scale=100 file= sort" ); //doesn't seem
to work ?
saveAs("AVI... ",""+dir+list1[i]+".avi");
close();
}
else
print("Error : Not an Image File!");
}
}
****************
The print statement works fine, and prints out the correct path to the
files, but they never seem to open. please help...
thanks,
-jeff