Hi,
I wanted to modify a jsl script during execution. Reason is as follows. I made a GUI for parameter correlation. The column list box, check boxes, and text edit boxes have set default value. I added the "Set Current as Default" button which means that whatever is currently inputted in the boxes will be the new default.
Below is the script copy for GUI only. What I want is to overwrite the values in the SetDef block if the user presses the "Set Current As Default" button.
Thanks for the help.
dt = Current Data Table();
SetDef = Expr(
// Set Default Values
corrcoldef = {:Name("ColName1")};
fitcoldef = {:Name("ColName2")};
parcoldef = {:Name("ColName3"),:Name("ColName4")};
grpcoldef = {:Name("ColName7"),:Name("ColName8")};
chkb1 = 0; //Uncheck Fit Y by X
chkb2 = 1; //Check Fit Y by X (m=1)
chkb3 = 1; //Check Output R^2 and Offset Table
chkb4 = 0; //Uncheck Output Static JMP report
ncolval = 4; //Number of plots per row in report window
);
GUI = Expr(
reflist = {};
nw = New Window ("Correlate",
TextBox(" Generates one-to-one correlation plots."),
SpacerBox(Size(1,10)),
H List Box (
SpacerBox(Size(10,1)),
V List Box (
Panel Box("Select Columns",
ColSource = ColListBox(dt, all, nlines(18)),
),
SetDefb = Button Box("Set Current as Default")
),
SpacerBox(Size(5,1)),
V List Box (
Panel Box ("",
Line Up Box ( Ncol(2),
corrb = Button Box("Correlate By"),
corrcol = ColListBox(dt,Min Items(1),Max Items(1), nlines(1)),
fitb = Button Box("Fit Line By"),
fitcol = ColListBox(dt,Max Items(1), nlines(1)),
TextBox(" Reference"),
refcombo = Combo Box (reflist),
parb = Button Box ("Parameters"),
parcol = ColListBox (dt, Min Items(1), nlines(8), <<SET data="https://community.jmp.com/" type=""></SET>
I suddenly had an idea. Store the default values in an external text file and modify that file instead.
But still, if there are better ideas, please let me know. 
Thanks,
Shaira