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???
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?
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