Skip to main content
Participant
October 5, 2022
Question

Make part of a text line bold in script

  • October 5, 2022
  • 3 replies
  • 329 views

I have a script that changes the text of a card in photoshop. I am trying to get it so that certain parts, say from characters "8" to "36" are BOLD, and the rest are not. Is this something I can do? 

 

Example:

Material: A small morsel of food

becomes

Material: A small morsel of food

 

Sometimes this will be in the middle of a block of text however.

This topic has been closed for replies.

3 replies

Chuck Uebele
Community Expert
Community Expert
October 5, 2022
Chuck Uebele
Community Expert
Community Expert
October 5, 2022

This is possible, but requires a lot of action manager code. I had a coworker who did that, but I no longer have the code. My suggestion would be to use scriptListener to record some text with the formatting you have in mind, then look at the code to see where you can swap the hard code for variables. Text code is really long!

Legend
October 5, 2022

@Minimuscle,

 

RE: "I have a script that changes the text of a card in photoshop"

Can you post the script that you have along with a sample/test file?

 

Regards,

Mike