Skip to main content
Inspiring
June 11, 2013
Answered

How to check the availability of selection

  • June 11, 2013
  • 1 reply
  • 394 views

Hello to all !

I have a script fills in the  selected area. But if the user has not made a selection, the string Mybounds = doc.selection.bouns an error. How I can check is the selection are not ?

This topic has been closed for replies.
Correct answer c.pfaffenbichler

You could wrap (var myBounds = app.activeDocument.selection.bounds) in a try clause.

1 reply

c.pfaffenbichler
Community Expert
c.pfaffenbichlerCommunity ExpertCorrect answer
Community Expert
June 11, 2013

You could wrap (var myBounds = app.activeDocument.selection.bounds) in a try clause.