Here's a couple of approaches.
First method, based directly on your code. Just add an argument to the message:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = Graph Builder(
Variables( X( :Sex ), Y( :Height ), Group X( :Age ) ),
Elements( Box Plot( X, Y ) )
);
obj << Save Script to Data Table("My Script");
The second method, if you simply want to attacth the script with a name, but not execute it:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Set Property("My Script,",
Graph Builder(
Variables( X( :Sex ), Y( :Height ), Group X( :Age ) ),
Elements( Box Plot( X, Y ) )
);
);
-Dave