Prompt user for file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Prompt user for file

John Alexander-7
Hello group,

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.

I want something like getDirectory that returns the directory as a
string.  Something like getFile that would prompt the user with an open
box, they would select a file, and the full path of the file would be
returned.

John


--
John K. Alexander, Ph.D.
Post-Doctoral Fellow
William Green Laboratory
University of Chicago
Dept. Neurobiology, Pharmacology, and Physiology
947 East 58th Street
Abott Hall 402
Chicago, IL 60637
(off) 773-702-9386
(fax) 773-702-3774
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Prompt user for file

Albert Cardona
> 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