A bit different version of Jim's code (Filter Each to get list of .jsl files, Eval(EvalExpr()) to append buttons with the paths)
Names Default To Here(1);
dir = "$SAMPLE_SCRIPTS/";
dir = Convert File Path(dir, windows);
files = Files In Directory(dir);
jslfiles = Filter Each({filename}, files, Word(-1, filename, ".") == "jsl");
// Not sure how you would like to determine column count, but with Lineup box it is fairly easy
lub = Lineup Box(N Col(4));
For Each({filename}, jslfiles,
Eval(EvalExpr(
lub << Append(Button Box(filename,
nw = New Window(Expr(filename),
Script Box(Load Text File(Expr(dir || filename)), "JSL", 600, 600)
);
));
));
);
nw = New Window("Scripts in " || dir,
Outline Box("Click to Open a Script",
lub
);
);
Depending on what you are doing, you might also consider having function/expression which each of the buttons call. Doing it in robust manner does take a bit of extra work though, so knowing how to create these simpler solutions is always a good idea.
-Jarmo