Welcome to the Community.
Here is the example of inverting the column selection from the Scripting Index
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:age << Set Selected( 1 );
dt:height << Set Selected( 1 );
Wait( 1 );
b = dt << Invert Column Selection;
And here is the example of how to delete selected columns from the Scripting Index
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:height << Set Selected;
Wait( 2 );
dt << Delete Columns();
As you can see, the Scripting Index is really a powerful learning tool and syntax reference.
Jim