Dear Friends,
How can we Create Guides from Selection using PS script or any other easy way ?
How to Create Guides from Selection ?
-
txuku
How to Create Guides from Selection ?
Bonjour
Try this :
Code: Select all//GuidesSelection.jsx
var valSelection = new Array();
valSelection = activeDocument.selection.bounds;
activeDocument.guides.add (Direction.HORIZONTAL, UnitValue (valSelection[1]));
activeDocument.guides.add (Direction.HORIZONTAL, UnitValue (valSelection[3]));
activeDocument.guides.add (Direction.VERTICAL, UnitValue (valSelection[0]));
activeDocument.guides.add (Direction.VERTICAL, UnitValue (valSelection[2]));
//inutile
//app.activeDocument.guides.visible == true; // ne fonctionne pas !
Try this :
Code: Select all//GuidesSelection.jsx
var valSelection = new Array();
valSelection = activeDocument.selection.bounds;
activeDocument.guides.add (Direction.HORIZONTAL, UnitValue (valSelection[1]));
activeDocument.guides.add (Direction.HORIZONTAL, UnitValue (valSelection[3]));
activeDocument.guides.add (Direction.VERTICAL, UnitValue (valSelection[0]));
activeDocument.guides.add (Direction.VERTICAL, UnitValue (valSelection[2]));
//inutile
//app.activeDocument.guides.visible == true; // ne fonctionne pas !