File Open Macro Help
Posted by doyleti on Jun 23, 2011; 2:24pm
URL: http://imagej.273.s1.nabble.com/File-Open-Macro-Help-tp3684153.html
I am a new imageJ user. I am trying to write a macro to open a series of individual files. When I simply recorded a macro it put the directory path in the format C:\\Temp\\SubDir\\file.bmp
If I use the getDirectory command in the macro and then use the dialog box to select the same directory, the format is the conventional C:\Temp\SubDir\
I can subsequently get a list of files or other directory information but when I use the open command
open(dir1 + list[i]) the file does not open
Could someone explain to me how I can get the double slashes if I use the macro or if there is something else going on? This seems like it should be simple.
Thank you,
Tim
Here is the actual code
dir1 = getDirectory("Choose Source Directory ");
list = getFileList(dir1);
setBatchMode(true);
for (i=0; i<list.length/2; i++) {
open(dir1+list[i]);
open(dir1+list[i+list.length/2]);
}