Hi, <br /><br />I have a script that I'm working on to open all the images in a folder, resize, set a fixed selection and then crop to the selection. My problem is that I can't seem to crop to the selection. The crop method is expecting an array but apparently not the array of the documents selection. <br /><br />function setTheSelection(){<br /> var openedImages = app.documents;<br /><br /> for(var i=0; i<openedImages.length; i++){<br /> var curImg = openedImages;<br /> var curWidth = curImg.width.as("px");<br /> var curHeight = curImg.height.as("px");<br /> var topCord = 0;<br /> var leftCord = 0;<br /> <br /> app.activeDocument = curImg;<br /> <br /> if (curWidth == 400 && curHeight > 275){<br /> var extra = Math.floor(curHeight-275); <br /> if (extra > 120){<br /> topCord = 20; // This is really only good for a few images. Commented out in the current production script<br /> } else{ <br /> topCord = Math.floor(extra/3);<br /> } <br /> }<br /> if (curHeight == 275 && curWidth > 400){<br /> var extra = Math.floor(curWidth-400);<br /> leftCord = Math.floor(extra/2);<br /> }<br /> // Select a square area at the top of the new document <br /> var selRegion = Array(Array(leftCord, topCord), <br /> Array(leftCord+400, topCord), <br /> Array(leftCord+400, topCord+275), <br /> Array(leftCord, topCord+275), <br /> Array(leftCord, 0))<br /> curImg.selection.select(selRegion, SelectionType.REPLACE, 0)<br /> curImg.crop(selRegion); /*!!! Here's the problem, but I don't understand why !!! */<br /> } <br />}//setTheSelection<br /><br />Am I misunderstanding the crop method?