Skip to content

Instantly share code, notes, and snippets.

@egoes
Created January 18, 2009 16:18
Show Gist options
  • Save egoes/48689 to your computer and use it in GitHub Desktop.
Save egoes/48689 to your computer and use it in GitHub Desktop.
Adobe InDesign javascript that shows a simple dialog with the geometric bounds of the selected object.
//DESCRIPTION:Show geometricBounds (y1, x1, y2, x2) /* ShowGeoBounds.jsx Adobe InDesign javascript by Enrique Pardo - www.enriquepardo.com Get it at: http://gist.github.com/48689 Shows a dialog box with the geometric bounds of the selected object y1 x1 y2 x2 [0] [1] [2] [3] y x x+w y+h */ var gb = app.activeDocument.selection[0].geometricBounds; var xcoord = gb[1] var ycoord = gb[0] var width = gb[3] - gb[1] var height = gb[2] - gb[0] alert ( 'x=' + xcoord + ' y=' + ycoord + '\rw=' + width + ' h=' + height + '\r(' + gb + ')' , 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment