1 Reply Latest reply: Oct 31, 2011 11:13 PM by John Hawkinson RSS

    selection.bounds operation?

    raybeau528

      I have this simple jsx script where I want to get the bounds of a selection:

       

      try

          {

              var s = app.activeDocument.selection.bounds

              alert(s.toSource())

          }

      catch(e)

          {

              alert("No selection")

          }

       

      It does detect that there is a selection present but does not return that array of x,y coordinates that bounds the selecton.

      The alert displays [({}),({}),({}),({})]

      all elements of the array are determined to be undefined.

       

      Any help is appreciated.

       

      Thanks!

       

      Ray