Skip navigation
Currently Being Moderated

Is it possible to modify this script to make objects same width or height?

Sep 13, 2012 8:09 AM

Tags: #script #height #width

I found this script that makes the selected objects the same width AND height. I am very new to creating scripts. is it possible to modify this to make an object the same width leaving their heights the same?



mySelection = activeDocument.selection;

if (mySelection.length>0){

if (mySelection instanceof Array) {


for (i=0; i<(mySelection.length-1); i++){

  ratioW = 100/(mySelection[i].width/goal.width);

  ratioH = 100/(mySelection[i].height/goal.height);





alert("Nothing selected!")




thanks in advance


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