Login  Register

Re: Prompt user for file

Posted by Albert Cardona on May 16, 2008; 4:52pm
URL: http://imagej.273.s1.nabble.com/Prompt-user-for-file-tp3696206p3696207.html

> This might be embarrassingly simple - but ...
>
> I want to prompt the user for a file - but not open it.  I just want the
> path and filename.
>  


http://rsb.info.nih.gov/ij/developer/api/ij/io/OpenDialog.html

http://rsb.info.nih.gov/ij/developer/api/ij/io/SaveDialog.html

The macro language has similar options:

http://rsb.info.nih.gov/ij/developer/macro/functions.html#F

*File.openDialog(title)* - Displays a file open dialog and returns the
path to the file choosen by the user (example
<http://rsb.info.nih.gov/ij/macros/OpenDialogDemo.txt>). The macro exits
if the user cancels the dialog. Requires 1.39d.


--
Albert Cardona
http://www.mcdb.ucla.edu/Research/Hartenstein/acardona