Mobile app version of vmapp.org
Login or Join
Turnbaugh909

: Photoshop: Change Text Box Position Coordinates Via Script Here's what I'd like to do. textLayer.textItem.position[0] = 200; I would expect this to change the x-coordinate of the text box to

@Turnbaugh909

Posted in: #PhotoshopScripting #Text

Here's what I'd like to do.

textLayer.textItem.position[0] = 200;


I would expect this to change the x-coordinate of the text box to 200px from the canvas origin. The value does not get assigned. Anybody know what I'm missing?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Turnbaugh909

1 Comments

Sorted by latest first Latest Oldest Best

 

@Michele215

I can recreate your scenario and I am not sure why it behaves this way. However, the following workaround is possible:

var y = textLayer.textItem.position[1];
textLayer.textItem.position = [200, y];


For some reason, the individual values of the UnitValue array are not mutable and we have to set position as a new array.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme