Skip navigation
raybeau528
Currently Being Moderated

selection.bounds operation?

Oct 31, 2011 4:48 PM

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

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points