To change the scaling add two more arguments to the function and use those in the lines instead on the "100"s
- desc.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Prc'), 100 );
- desc.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Prc'), 100 );
Part Three: Turn off user interaction — I am think I just need to change line 15 "DialogModes.ALL" > "DialogModes.NO" Can anyone confirm?
Simply testing that for yourself should hardly take more than a couple of minutes.
Adobe DOM has no transform method it just has a resize method. You can make a transform function using Action Manager code. However I do not know how one using Applescript would go about that.
If you do not keep the width and height percentage the same resize will distort. For pixel layers setting Photoshop Preference Interpolation may enable you to use the interpolation method you prefer. I always use Bicubic I don't like Adobe Bicubic Automatic. In perpetual CS6 there is a bug in scripting Photoshop Preference Interpolation. You can set it to Bicubic but you will get an internal scripting error if you try to retrieve and restore its setting and the user Preference setting is Bicubic Automatic. This bug has been fixed in CS6 subscription version 13.1.2.
Thank you, didn't even realize the answer was in front of me.
I have an issue where on 72 PPI images this would prefect but at 300 PPI it move is way off canvas. Why would it put the anchor point in what looks like 3 times the distance of the input.
Found my answer, was in the units for the oringal script I found. I just changed '#Rlt' to '#Pxl' on 2 of the lines dealing with anchor points. For anyone else in the same boat, here you go:
#define unitAngle '#Ang' // Unit value - base degrees
#define unitDensity '#Rsl' // Unit value - base per inch
#define unitDistance '#Rlt' // Unit value - base 72ppi
#define unitNone '#Nne' // Unit value - coerced.
#define unitPercent '#Prc' // Tagged unit value.
#define unitPixels '#Pxl' // Tagged unit value.