I don't know of a direct way to access the group name by JSL. One possible idea for a workaround is to dig out the name from the JSL-version of the table (i.e. dt<<get script).
Here's an example that seems to work:
//Open example table and make two groups of columns and name one "Inputs"
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Group Columns( "Inputs", height, 2 );
dt << Group Columns( :name, 2 );
//Select columns in group "Inputs"
t = dt << get script;
col_names = dt << get column names( string );
c = 0;
While( c >= 0,
If( Arg( Arg( t, N Arg( t ) - c ), 1 ) == "Inputs",
first_col = Char( Arg( Arg( t, N Arg( t ) - c ), 2 ) );
group_size = Arg( Arg( t, N Arg( t ) - c ), 3 );
first_col_nr = Contains( col_names, first_col );
For( i = first_col_nr, i <= first_col_nr + group_size - 1, i++,
Column( i ) << set selected( 1 )
);
c = -1;
,
c++
)
);
// make a list of the columns to use in further analyses...
Inputs_list = dt << get selected columns;