Subscribe Bookmark RSS Feed

How to script a dialog box for multiple file?

WHTseng

Occasional Contributor

Joined:

May 19, 2017

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

Joined:

Jun 22, 2012

Solution

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
2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

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

Occasional Contributor

Joined:

May 19, 2017

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.