cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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