// =======================================================
var idslct = charIDToTypeID( "slct" );
var desc3 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref1 = new ActionReference();
var idmagicWandTool = stringIDToTypeID( "magicWandTool" );
ref1.putClass( idmagicWandTool );
desc3.putReference( idnull, ref1 );
var iddontRecord = stringIDToTypeID( "dontRecord" );
desc3.putBoolean( iddontRecord, true );
var idforceNotify = stringIDToTypeID( "forceNotify" );
desc3.putBoolean( idforceNotify, true );
executeAction( idslct, desc3, DialogModes.NO );
// =======================================================
var idsetd = charIDToTypeID( "setd" );
var desc4 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref2 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
var idfsel = charIDToTypeID( "fsel" );
ref2.putProperty( idChnl, idfsel );
desc4.putReference( idnull, ref2 );
var idT = charIDToTypeID( "T " );
var desc5 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idPxl = charIDToTypeID( "#Pxl" );
desc5.putUnitDouble( idHrzn, idPxl, 10 );
var idVrtc = charIDToTypeID( "Vrtc" );
var idPxl = charIDToTypeID( "#Pxl" );
desc5.putUnitDouble( idVrtc, idPxl, 10 );
var idPnt = charIDToTypeID( "Pnt " );
desc4.putObject( idT, idPnt, desc5 );
var idTlrn = charIDToTypeID( "Tlrn" );
desc4.putInteger( idTlrn, 32 );
var idAntA = charIDToTypeID( "AntA" );
desc4.putBoolean( idAntA, true );
executeAction( idsetd, desc4, DialogModes.NO );