Hi, I have a document where I executed a script creating a single horizontal guide based on a marquee selection. That guide is always in a different position.
Now I want to make a new marquee selection (the old one is deselected), selecting everything above that guide (the selection attached to it).
Is there an action or script for this?
Found it here in the discussions:
// regards pixxxel schubser
var aDoc = activeDocument;
var Sel = aDoc.selection.bounds;
I'm a total noob with scripts.
app.preferences.rulerUnits = Units.PIXELS; app.preferences.typeUnits = TypeUnits.PIXELS var aDoc = activeDocument; var Sel = aDoc.selection.bounds; aDoc.guides.add(Direction.HORIZONTAL, Sel); activeDocument.selection.select([[0,0], [activeDocument.width,0], [activeDocument.width, Sel], [0, Sel]])
Thank you, that did it.
jazz-y has come to the rescue yet again, I was just going to suggest that you use Select > Reselect and then Select > Inverse, assuming that the original marquee selection was in that session without another selection being added (also assuming that the original selection went all the way to the canvas edges...yes, a lot of assumptions!).