Skip to main content
Retsied
Known Participant
April 13, 2019
Answered

Script to change all text to lowercase

  • April 13, 2019
  • 1 reply
  • 2221 views

Hi, I'm looking for a way to change a text layer to all lowercase. The original has a mix of both upper and lowercase, so the tools in Character window (All Caps, Small Caps, etc) won't work. This could maybe be done by copying the layer, and replacing the uppercase characters with lowercase, if possible. Any ideas?

This topic has been closed for replies.
Correct answer pixxxelschubser

To little informations.

For the beginning:

var txt = activeDocument.activeLayer; // text layer should be the active layer!

var con = txt.textItem.contents.toLowerCase();

txt.textItem.contents = con;

If that works for you

have fun

1 reply

pixxxelschubser
Community Expert
pixxxelschubserCommunity ExpertCorrect answer
Community Expert
April 13, 2019

To little informations.

For the beginning:

var txt = activeDocument.activeLayer; // text layer should be the active layer!

var con = txt.textItem.contents.toLowerCase();

txt.textItem.contents = con;

If that works for you

have fun