Here is simple example which adds text from a file to table as table script
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dt << Delete Scripts(dt << Get Table Script Names); // demo
script_txt = Load Text File("$SAMPLE_SCRIPTS/chaosGame.jsl");
Eval(EvalExpr(
dt << New Script("S",
Expr(Parse(script_txt))
);
));
If you wish to keep comments, it will be slightly more complicated.
Edit: Also if comments are not needed, you can use Include with << Parse Only
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dt << Delete Scripts(dt << Get Table Script Names); // demo
script_expr = Include("$SAMPLE_SCRIPTS/chaosGame.jsl", << parse only);
Eval(EvalExpr(
dt << New Script("S",
Expr(Name Expr(script_expr))
);
));
-Jarmo