Make selection from guide
Please help me,
I want make selection from two guides existing. Then remove the guides.
Thanks for so much!
Please help me,
I want make selection from two guides existing. Then remove the guides.
Thanks for so much!
Based on Paul Riggotts script:
Re: Is this possible to draw square selection between two Guides...?
#target photoshop
app.bringToFront();
main();
function main(){
if(app.version.match(/\d+/) < 12) return;
if(!documents.length) return;
var doc = activeDocument;
var guides = doc.guides;
if(guides.length != 2) return;
if(guides[0].direction != guides[1].direction) return;
var startRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
var SB = new Array();
if(guides[0].direction == Direction.HORIZONTAL && guides[1].direction == Direction.HORIZONTAL){
var vertDistance = doc.guides[1].coordinate.value - doc.guides[0].coordinate.value;
SB[0] = 0;
SB[1] = doc.guides[0].coordinate.value;
SB[2] = doc.width;
SB[3] = doc.guides[1].coordinate.value;
}
if(guides[0].direction == Direction.VERTICAL && guides[1].direction == Direction.VERTICAL){
var horzDistance = doc.guides[1].coordinate.value - doc.guides[0].coordinate.value;
SB[0] = doc.guides[0].coordinate.value;
SB[1] = 0;
SB[2] = doc.guides[1].coordinate.value;
SB[3] = doc.height;
}
activeDocument.selection.select([[SB[0],SB[1]],[SB[2],SB[1]],[SB[2],SB[3]],[SB[0],SB[3]]], SelectionType.REPLACE, 0, false);
doc.guides.removeAll();
app.preferences.rulerUnits = startRulerUnits;
};
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.