Script with magic wand
I noticed there's no documentaion on scripting (javascript) with the magic wand selection. I'd assume that it's along the lines of magicwand.(X,Y).tolerance.contigious.true.samplealllayers.true. or something like that. But it's guess work.
var id176 = charIDToTypeID( "setd" );
var desc34 = new ActionDescriptor();
var id177 = charIDToTypeID( "null" );
var ref15 = new ActionReference();
var id178 = charIDToTypeID( "Chnl" );
var id179 = charIDToTypeID( "fsel" );
ref15.putProperty( id178, id179 );
desc34.putReference( id177, ref15 );
var id180 = charIDToTypeID( "T " );
var desc35 = new ActionDescriptor();
var id181 = charIDToTypeID( "Hrzn" );
var id182 = charIDToTypeID( "#Pxl" );
desc35.putUnitDouble( id181, id182, 0.000000 );
var id183 = charIDToTypeID( "Vrtc" );
var id184 = charIDToTypeID( "#Pxl" );
desc35.putUnitDouble( id183, id184, 0.000000 );
var id185 = charIDToTypeID( "Pnt " );
desc34.putObject( id180, id185, desc35 );
var id186 = charIDToTypeID( "Tlrn" );
desc34.putInteger( id186, 32 );
var id187 = charIDToTypeID( "Mrgd" );
desc34.putBoolean( id187, true );
var id188 = charIDToTypeID( "AntA" );
desc34.putBoolean( id188, true );
executeAction( id176, desc34, DialogModes.NO );
I've got the above by the old script listener and I was just trying to tidy it up (and learn a bit in the process)
Cheers