Rectangular Marquee tool
Hi All,
Hi All,
New to Photoshop & Photoshop Scripting.
How to create Rectangle using Rectangle Marquee Tool?

Regards
Siraj
Hi All,
Hi All,
New to Photoshop & Photoshop Scripting.
How to create Rectangle using Rectangle Marquee Tool?

Regards
Siraj
Hi BEGINNER_X,
replace these lines
// other code
Circle(0,0,Height,Height,0);
function Circle(Top,Left,Bottom,Right,Feather) {
if(Feather == undefined) Feather = 0;
var desc3 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') );
desc3.putReference( charIDToTypeID('null'), ref1 );
var desc4 = new ActionDescriptor();
desc4.putUnitDouble( charIDToTypeID('Top '), charIDToTypeID('#Pxl'), Top );
desc4.putUnitDouble( charIDToTypeID('Left'), charIDToTypeID('#Pxl'), Left );
desc4.putUnitDouble( charIDToTypeID('Btom'), charIDToTypeID('#Pxl'), Bottom );
desc4.putUnitDouble( charIDToTypeID('Rght'), charIDToTypeID('#Pxl'), Right );
desc3.putObject( charIDToTypeID('T '), charIDToTypeID('Elps'), desc4 );
desc3.putUnitDouble( charIDToTypeID('Fthr'), charIDToTypeID('#Pxl'), Feather );
desc3.putBoolean( charIDToTypeID('AntA'), true );
executeAction( charIDToTypeID('setd'), desc3, DialogModes.NO );
};
with these lines
// other code
rectangleSelection (0, 0, Height, Height, 0);
function rectangleSelection(Top,Left,Bottom,Right,Feather) {
if(Feather == undefined) {Feather = 0;}
var desc1 = new ActionDescriptor();
var ref5 = new ActionReference();
ref5.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') );
desc1.putReference( charIDToTypeID('null'), ref5 );
var desc2 = new ActionDescriptor();
desc2.putUnitDouble( charIDToTypeID('Top '), charIDToTypeID('#Pxl'), Top );
desc2.putUnitDouble( charIDToTypeID('Left'), charIDToTypeID('#Pxl'), Left );
desc2.putUnitDouble( charIDToTypeID('Btom'), charIDToTypeID('#Pxl'), Bottom );
desc2.putUnitDouble( charIDToTypeID('Rght'), charIDToTypeID('#Pxl'), Right );
desc1.putObject( charIDToTypeID('T '), charIDToTypeID('Rctn'), desc2 );
desc1.putUnitDouble( charIDToTypeID('Fthr'), charIDToTypeID('#Pxl'), Feather );
executeAction( charIDToTypeID('setd'), desc1, DialogModes.NO );
};
Have fun
![]()
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.