@jthi Thanks. I have added Pick File and the basic functionality seems to be there in the script below.
Now how/where do I limit the file selection to just JMP files. Also is it possible to use the TestStage entry to limit/filter the number of files visible in the dialog created by Pick File?
Names Default To Here(1);
clear log ();
set_f_path = Expr(
cur_teb = (this << prev sib);
new_f_dir = Pick File(cur_teb << get text);
If(!IsMissing(new_f_dir),
cur_teb << Set Text(Convert File Path(new_f_dir, windows));
);
);
set_path = Expr(
cur_teb = (this << prev sib);
new_dir = Pick Directory(cur_teb << get text);
If(!IsMissing(new_dir),
cur_teb << Set Text(Convert File Path(new_dir, windows));
);
);
dlg = New Window("Please enter the following",
<<Modal,
<<Return Result,
Border Box(Top(20), Bottom(0), Left(20), Right(20),
V List Box(
tb1 = Text Box("Test Stage "),
teb1 = Text Edit Box("CAP", <<Set Width(200)),
teb1 << Set Hint("CAP or RES or RF");
tbs17 = Text Box("");,
tb2 = Text Box("Duration"),
teb2 = Text Edit Box("April 2023", <<Set Width(200)),
teb2 << Set Hint("e.g. April 2023, Dec 2024 etc");
tbs27 = Text Box("");,
tb3 = Text Box("Specify path to file or browse to data file (should pre-exist)",<< set font style("bold")),
Lineup Box(N Col(2),
teb3 = Text Edit Box("$Documents\", <<Set Width(200)), << Set Hint("e.g. /Tech/");
Button Box("Browse", << Set Function(function({this},
set_f_path;
)))
),
tbs37 = Text Box("");,
tb4 = Text Box("Specify path to file or browse to data summary file (should pre-exist)", << set font style("bold")),
Lineup Box(N Col(2),
teb4 = Text Edit Box("$Documents\", <<Set Width(200)), << Set Hint("e.g. /Tech/");
Button Box("Browse", << Set Function(function({this},
set_f_path;
)))
),
//teb4 << Set Hint("e.g. /Tech/");
tbs47 = Text Box("");,
tb5 = Text Box("Report saving directory (should pre-exist)", << set font style("bold")),
Lineup Box(N Col(2),
teb5 = Text Edit Box("$Documents\Report\", <<Set Width(200), << Set Hint("e.g. /Tech/")),
Button Box("Browse", << Set Function(function({this},
set_path;
)))
),
tbs57 = Text Box("");,
H List Box(
Button Box("OK"),
Button Box("Cancel"),
),
tb1 << set font style("bold");
tb2 << set font style("bold");
//tb3 << set font style("bold");
//tb4 << set font style("bold");
)
)
);
TestSatge = dlg["teb1"]; Duration = dlg["teb2"]; dtPickPath = dlg["teb3"]; dt_SumCap = dlg["teb4"]; RptSavePath = dlg["teb5"];
Show(TestSatge);Show(Duration); Show (dtPickPath); Show (dt_SumCap); Show (RptSavePath);
If(dlg["Button"] != 1, Throw("Will Stop Further Execution"));
When it's too good to be true, it's neither