Copy link to clipboard
Copied
Hello,
I am trying to figure how to move around my text in Photoshop and I cant understand what coordinates you must use, please somebody help me i'm losing my mind here- i keep trying but failing!!!!!!
Copy link to clipboard
Copied
If you are trying just to move around your text, with the Type Tool (T) click on the text and release, and then move your cursor away a bit until it changes to an arrow. Click and hold and it will allow you to move the text around.
Copy link to clipboard
Copied
I assume you mean you are trying to move the text with a script.
There is two ways you can move type. One way is with the textItem properties. The other way it with the artLayer.translate(). Which way are you trying to use?
Copy link to clipboard
Copied
yeah sorry with script- trying to move text with textItem properties but I cant figure out which coordinates to use-when I figure out the point I want them at and put it into the script they end up somewhere else entirely!!
Copy link to clipboard
Copied
Try this:
var aLay= app.activeDocument.activeLayer;
if(aLay.textItem && aLay.textItem.contents != "")
alert(aLay.textItem.position);
aLay.textItem.position = [100,100];
app.refresh();
alert(aLay.textItem.position);
Copy link to clipboard
Copied
Two things to keep in mind. The position property accepts UnitValue objects. You can use number objects be then it will default to whatever the current ruler unit is set to in the GUI. So you should either use UnitValues or set the ruler unit before changing theposition.
app.activeDocument.activeLayer.textItem.position = [UnitValue(10,'px'),UnitValue(20,'px')];
The second thing to keep in mind it there are two types of text in Photoshop. PointText and ParagraphText. With paragraphText the position is determined from the top left corner of the bounding box. With pointText the position is determined from either the start of the text, the center of the text, or the end of the text depending on the justification property. So pointText can be the hardest to position using the position property if the text is centered or has right justification.