2 Replies Latest reply on Jul 8, 2009 5:17 PM by John Kallios

    JS CS4: Changing the size of a selected rectangle

    John Kallios Level 2

      Hello All,

       

      I can get my dimension of my selection with:

       

      var gb = app.selection[0].geometricBounds;
      myWidth = app.activeDocument.selection[0].geometricBounds[3] - app.activeDocument.selection[0].geometricBounds[1];
      myHeight = app.activeDocument.selection[0].geometricBounds[2] - app.activeDocument.selection[0].geometricBounds[0];

       

      myDimensions = [myWidth,  " ", myHeight]
      alert (myDimensions);

       

      I'm failing to come up with the code to adjust the size. I want to ruduce the width by .5" and height by .25".

       

      I'm still do not fully understand the OMV in terms of finding properties and how to code it. Advice will be greatly appreciated.

       

      John