Re: macro command to designate but not open a file?

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/macro-command-to-designate-but-not-open-a-file-tp5014926p5014940.html

Bill Christens-Barry wrote:

> Also, I'd like to specify a default starting path for the getDirectory() macro command, but don't see a way to do this. Is there a means for doing this in the macro language?

This is not obvious, but you can use the 'call' method of the macro language to access a static java method such as setting the default directory for ImageJ 'open' commands:

  call("ij.io.OpenDialog.setDefaultDirectory", myNewDefaultDirectory);

By the way, you can also get the current default:

  currentDefaultDirectory = call("ij.io.OpenDialog.getDefaultDirectory");

Michael

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