Problem using Image Sequence command from a macro

Posted by Paletzki, Ron (NIH/NIMH) [C] on
URL: http://imagej.273.s1.nabble.com/Problem-using-Image-Sequence-command-from-a-macro-tp5012669.html

I have a macro that creates a stack and then tries to save it to a folder using the Image Sequence command.   Problem is it works fine if the folder it’s saving to has no spaces in the name but fails if it does.   I’m wondering if this is a bug since it has never been an issue before in other macros using other save and open commands.  This is the first macro using the Image Sequence command.

Here is an example macro that demonstrates the bug.  With a stack open if I run this macro and select a folder with a name that contains a space in it I get an error
 “File Saving error (IOException):

If I select a folder that does not contain a space in the name it works fine.

macro "Save Stack  [f2]"{
    dirOutput = getDirectory("Choose Output Directory for stack");
    Dialog.create(" Macro Options ");
    Dialog.addString("Enter Filename for stack ","fileName");
    Dialog.show();
    fileNameStack = Dialog.getString();
    run("Image Sequence... ", "format=TIFF name="+fileNameStack+" digits=3 save="+dirOutput);
}


By the way this in running on a Mac using Image 149s8

Thanks
Ron


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html