Oh, boy! That type of interface seems fraught with issues. What if the user picks 10 data files and only 8 scripts, or vice versa? What if the user wants to run 3 different scripts (analyses) on one file, or selects 10 data files but wants to run the same analyses on each? I do not know your use case, however, I'd create a dialog, with 3 items in a horizontal display: 1) a selection list of the the files in D:/Test , 2) a button box, called "Select" or "Analyze", and 3) a selection list with the scripts on the right.
The user selects the intended files on each side, then presses the "Select" button. Each select would create a list of two items, a list of the selected data files and a list of the scripts and store them another list called sel_List (or other object, an associative array or data table). The intent is each script is run on each data file for a given selection. If your use files are 1:1 then allow only one selection in each list box, i.e., select one data file, select one jsl file, then press "Select."
Pressing "Ok" would begin processing on each selection, using nested for loops:
- For(i=1, i<=nitems(sel_List), i++,
- For(j=1, j<=nitems(sel_List[i][1]), j++, //open (sel_List[i][1][j] ); //open a data table
- For(k=1, k<=nitems(selList[i][2]), k++,
- Include(sel_List[i][2][k]); // include runs on the current data table
- Save/or journal and likely close analysis windows
- ); // end for k. By using include the JSL file is executed but not open.
- ); //end for j close(selList[i][1][j]) close the data table
- ); // end for i
If you are using JMP 14, Multiple File Import() might be of some use.
I attached a script (has the name App, but is not an addin) that does not have the interface described above, but might give you some ideas on how to create the selection window. [It was written for chapter 2 of JSL Companion].
Good Luck!
If there really is only 1 script associated for each file or file type, then I wouldn't have the user select it, but build in the logic with naming conventions etc.
Anyway, my 2 cents.