cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Victor3
Level II

How do I assign file folder path when I open file explore?

Hi expert,

 

I would like to write a jsl to query user to assign a file to import. It's always open the same folder as my jsl file. I would like to open desktop when pop up the file explore. Can I do that?

Names Default To Here( 1 );

New Window( "File explore",
	<<modal,
	Spacer Box( size( 20, 10 ) ),
	Text Box( "Choose a log.txt file:" ),
	BB1 = Button Box( "Pick file",
		D = Pick File();
		If( D != "",
			file1 << set text( D )
		);
	),
	file1 = Text Box( ), 

);
Victor Huang
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How do I assign file folder path when I open file explore?

Scripting Index has sometimes very good examples

jthi_0-1722839051200.png

In this case if you want it to open on Desktop, you can use $DESKTOP path variable

Names Default To Here(1);

New Window("File explore",
	<<modal,
	Spacer Box(size(20, 10)),
	Text Box("Choose a log.txt file:"),
	BB1 = Button Box("Pick file",
		D = Pick File("Select file", "$DESKTOP");
		If(D != "",
			file1 << set text(D)
		);
	),
	file1 = Text Box(), 

);
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How do I assign file folder path when I open file explore?

Scripting Index has sometimes very good examples

jthi_0-1722839051200.png

In this case if you want it to open on Desktop, you can use $DESKTOP path variable

Names Default To Here(1);

New Window("File explore",
	<<modal,
	Spacer Box(size(20, 10)),
	Text Box("Choose a log.txt file:"),
	BB1 = Button Box("Pick file",
		D = Pick File("Select file", "$DESKTOP");
		If(D != "",
			file1 << set text(D)
		);
	),
	file1 = Text Box(), 

);
-Jarmo

Recommended Articles