cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
WHTseng
Level III

How to script a dialog box for multiple file?

Hi JMP users,

 

I am looking for a method to select many files, and then point them into different variables.

I don’t think the function Pick File is suitable because I have to set the variables to the data tables one by one.

 

The first thing crossed my mind is file select dialog(like the picture below), I can input the path or select the files from icon.

And point every file to the corresponding variable in script code, no manual selection is needed.

Do you have idea how to make it with JMP script?

dialog.jpg

 

Thank you for all the supports.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to script a dialog box for multiple file?

I would use Pick Directory()

Names Default To Here( 1 );
Pick File(
	"Select JMP File",
	"$DOCUMENTS",
	{"JMP Files|jmp;jsl;jrn", "All Files|*"},
	1,
	0,
	"newJmpFile.jmp"
);

and then the Files in Directory()

 

Files In Directory( "$HOME" );

to get started with what you want to do.

 

Look to the Scripting Index for the examples and definitions

     Help==>Scripting Index

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to script a dialog box for multiple file?

I would use Pick Directory()

Names Default To Here( 1 );
Pick File(
	"Select JMP File",
	"$DOCUMENTS",
	{"JMP Files|jmp;jsl;jrn", "All Files|*"},
	1,
	0,
	"newJmpFile.jmp"
);

and then the Files in Directory()

 

Files In Directory( "$HOME" );

to get started with what you want to do.

 

Look to the Scripting Index for the examples and definitions

     Help==>Scripting Index

Jim
WHTseng
Level III

Re: How to script a dialog box for multiple file?

Hi txnelson,

Thank you for the idea.
Files in Directory() indeed gives me the file list so that I can do further selection among them.