Hi,
When we select object via marquee tool, I need to cut this object and paste at the same place as layer 1 and resize the object to 10 % and re select the second object and do the same process.
But i am unable to do this process.
Please find the below, any help is much appreciated.
var aDoc = app.activeDocument;
var Sel = aDoc.selection;
// =======================================================
var idCpTL = charIDToTypeID( "CpTL" );
executeAction( idCpTL, undefined, DialogModes.NO );
// =======================================================
var idslct = charIDToTypeID( "slct" );
var desc16 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref10 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
ref10.putName( idLyr, "Layer 1" );
desc16.putReference( idnull, ref10 );
var idMkVs = charIDToTypeID( "MkVs" );
desc16.putBoolean( idMkVs, false );
executeAction( idslct, desc16, DialogModes.NO );
aDoc.activeLayer.resize(105,105, AnchorPosition.MIDDLECENTER)
alert ("OK", "Test")
//How to select the second object help needed //
// =======================================================
var idCpTL = charIDToTypeID( "CpTL" );
executeAction( idCpTL, undefined, DialogModes.NO );
var idslct = charIDToTypeID( "slct" );
var desc25 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref18 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
ref18.putName( idLyr, "Layer 2" );
desc25.putReference( idnull, ref18 );
var idMkVs = charIDToTypeID( "MkVs" );
desc25.putBoolean( idMkVs, false );
executeAction( idslct, desc25, DialogModes.NO );
aDoc.activeLayer.resize(105,105, AnchorPosition.MIDDLECENTER)
// =======================================================
var idCpTL = charIDToTypeID( "CpTL" );
executeAction( idCpTL, undefined, DialogModes.NO );
var idslct = charIDToTypeID( "slct" );
var desc30 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref22 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
ref22.putName( idLyr, "Layer 3" );
desc30.putReference( idnull, ref22 );
var idMkVs = charIDToTypeID( "MkVs" );
desc30.putBoolean( idMkVs, false );
executeAction( idslct, desc30, DialogModes.NO );
aDoc.activeLayer.resize(105,105, AnchorPosition.MIDDLECENTER)
regards,
Vinoth