Re: Macro to browse for a file name
Posted by
ctrueden on
Apr 25, 2008; 7:02pm
URL: http://imagej.273.s1.nabble.com/Macro-to-browse-for-a-file-name-tp3696431p3696433.html
Hi Jon,
Check out the File.openDialog(title) function.** Something like:
path = File.openDialog("Choose a File");
run("Raw...", "open=["+path+"] image=[24-bit RGB] width=360 height=240
offset=0 number=1 gap=0 little-endian");
-Curtis
On Fri, Apr 25, 2008 at 12:54 PM, Jon Harman <
[hidden email]>
wrote:
> Hi,
>
> I am not used to writing macros and am having a hard time figuring out how
> to do this:
>
> I want to write a macro to import some raw data. It will use the line:
>
>
> run("Raw...", "open=filename image=[24-bit RGB] width=360 height=240
> offset=0 number=1 gap=0 little-endian");
>
>
> Is there a macro function to browse for a file that returns the file name,
> but does not open it. I want to let the user browse for the filename above.
>
> Thanks for any help.
>
> Jon
>