Photoshop CS script doesn't translate to CS2

I have an applescript that has the command

“translate layer 1 delta x pixels 1500”

Works perfectly in CS, however, in CS2 - the pixel values don’t seem to correspond properly. In order to get the statement to work in CS2, I would have to change the 1500 to somewhere in the vacinity of 300.

Anyone have any idea why the pixel values would be different???

freaking weird!

In CS1 - this is the handle.


to make_2_5x7s()
	tell application "Adobe Photoshop CS1"
		tell current document
			duplicate
			duplicate layer 1
			resize canvas anchor position top left width 3000 height 2400
			set current layer to layer 1
			translate layer 1 delta x pixels 1500
		end tell
	end tell
	addText()
	tell application "Adobe Photoshop CS1" to flatten current document
	saveThePrint()
	tell application "Adobe Photoshop CS1" to close current document
end make_2_5x7s

and yet, in CS2 - I have to reduce the translation command by 24.05% to yield the following:


to make_2_5x7s()
	tell application "Adobe Photoshop CS2"
		tell current document
			duplicate
			duplicate layer 1
			resize canvas anchor position top left width 3000 height 2400
			set current layer to layer 1
			translate layer 1 delta x pixels 360.7 --1500
		end tell
	end tell
	addText()
	tell application "Adobe Photoshop CS2" to flatten current document
	saveThePrint()
	tell application "Adobe Photoshop CS2" to close current document
end make_2_5x7s

This seems to work in both x and y directions and for all values. Anyone have any idea what the significance of the 24% is?

Hi there,
Photoshop CS2 miscalculates if the ruler units is not pixel units.
try to add this:

tell application "Adobe Photoshop CS2"
set ruler units of settings to pixel units
end tell

Greets from
TMA

Early in the script I have already set the ruler units to pixels with this:

tell application "Adobe Photoshop CS2"
	activate
	set foreground color to {class:RGB color, red:255, green:255, blue:255}
	set background color to {class:RGB color, red:255, green:255, blue:255}
	set ruler units of settings to pixel units
end tell