Hello all,
I would like to make a script to change some text inside Photoshop CS5.
I try with both JS Scripts & Actions PSD; and it does replace the text on the right layer, but the text is moved to the top left corner of the document.
I am sorry I am a real newbie about PS Scripts…
and I try to search on this forum for topic about text; but we are not able to search for this word…
Please help me if you have some links about scripting text modification / text tool / or related scripts
Thanks in advance.
Modif. / Replace Text Script
Re: Modif. / Replace Text Script
It's intended for single-line text however it works for multi-lines on the condition 'next line' spaces between letters won't be changed.
Entered new multi-line text will be cut that only text from first line will be put into the layer.
For more options it's good to learn ScriptUI http://www.kahrel.plus.com/indesign/scriptui.html and RegExp http://www.rexegg.com/
Best to use it, is record it by action and bind to some function key.
Entered new multi-line text will be cut that only text from first line will be put into the layer.
For more options it's good to learn ScriptUI http://www.kahrel.plus.com/indesign/scriptui.html and RegExp http://www.rexegg.com/
Code: Select all
cnt = 'aL.textItem.contents'
if (documents.length && (aL = activeDocument.activeLayer).kind == 'LayerKind.TEXT') {
res = prompt("Edit following text:", eval(cnt)), eval(cnt + ' = res')
}
else alert("You need to have opened document with selected editable layer!")
- Attachments
-
- Text Layer Edit.zip
- (489 Bytes) Downloaded 339 times