Login  Register

How to have File.openAsString() start in a specified directory?

Posted by Bill Christens-Barry-2 on Nov 27, 2018; 9:32pm
URL: http://imagej.273.s1.nabble.com/How-to-have-File-openAsString-start-in-a-specified-directory-tp5021503.html

I would like to choose and open a (text) file that is in a particular directory of my choosing. I've not found a way to have the open dialog begin in this directory unless it happens to have been the most recently visited directory. The File.openAsString() macro function needs either a complete path that includes the file name, or a null path, in which case the user must navigate to the desired directory before choosing the file. But I've not found a way to have the open dialog start where I'd like, as the OS seems to control the initial path that is used by the dialog (on macos at least).

Can this be done with existing macro functions?

Thanks.

-- equipoise

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